update code toward php8 compliance
This commit is contained in:
parent
66360758aa
commit
afe918c76b
@ -716,7 +716,7 @@ print '</tr>';
|
||||
*/
|
||||
|
||||
// View product description in thirdparty language
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ViewProductDescInThirdpartyLanguageAbility").'</td>';
|
||||
print '<td class="right">';
|
||||
|
||||
@ -347,7 +347,7 @@ if ((isModEnabled("product") || isModEnabled("service")) && ($user->rights->prod
|
||||
}
|
||||
|
||||
// Multilangs
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
$sql = "SELECT label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||
$sql .= " WHERE fk_product = ".((int) $objp->rowid);
|
||||
|
||||
@ -179,7 +179,7 @@ $fieldstosearchall = array(
|
||||
|
||||
);
|
||||
// multilang
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
$fieldstosearchall['pl.label'] = 'ProductLabelTranslated';
|
||||
$fieldstosearchall['pl.description'] = 'ProductDescriptionTranslated';
|
||||
$fieldstosearchall['pl.note'] = 'ProductNoteTranslated';
|
||||
@ -444,7 +444,7 @@ if (!empty($searchCategoryProductList) || !empty($catid)) {
|
||||
}
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||
// multilang
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND pl.lang = '".$db->escape($langs->getDefaultLang())."'";
|
||||
}
|
||||
|
||||
@ -1309,7 +1309,7 @@ if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
// Multilangs
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) { // If multilang is enabled
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) { // If multilang is enabled
|
||||
$sql = "SELECT label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||
$sql .= " WHERE fk_product = ".((int) $obj->rowid);
|
||||
|
||||
@ -214,7 +214,7 @@ print "</tr>\n";
|
||||
if ($mode && $mode != '-1') {
|
||||
foreach ($infoprod as $prodid => $vals) {
|
||||
// Multilangs
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) { // si l'option est active
|
||||
$sql = "SELECT label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||
$sql .= " WHERE fk_product = ".((int) $prodid);
|
||||
|
||||
@ -608,7 +608,7 @@ while ($i < $imaxinloop) {
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
// Multilangs
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) { // si l'option est active
|
||||
// TODO Use a cache
|
||||
$sql = "SELECT label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user