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
|
// View product description in thirdparty language
|
||||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("ViewProductDescInThirdpartyLanguageAbility").'</td>';
|
print '<td>'.$langs->trans("ViewProductDescInThirdpartyLanguageAbility").'</td>';
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
|
|||||||
@ -347,7 +347,7 @@ if ((isModEnabled("product") || isModEnabled("service")) && ($user->rights->prod
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Multilangs
|
// Multilangs
|
||||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||||
$sql = "SELECT label";
|
$sql = "SELECT label";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||||
$sql .= " WHERE fk_product = ".((int) $objp->rowid);
|
$sql .= " WHERE fk_product = ".((int) $objp->rowid);
|
||||||
|
|||||||
@ -179,7 +179,7 @@ $fieldstosearchall = array(
|
|||||||
|
|
||||||
);
|
);
|
||||||
// multilang
|
// multilang
|
||||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||||
$fieldstosearchall['pl.label'] = 'ProductLabelTranslated';
|
$fieldstosearchall['pl.label'] = 'ProductLabelTranslated';
|
||||||
$fieldstosearchall['pl.description'] = 'ProductDescriptionTranslated';
|
$fieldstosearchall['pl.description'] = 'ProductDescriptionTranslated';
|
||||||
$fieldstosearchall['pl.note'] = 'ProductNoteTranslated';
|
$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";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||||
// multilang
|
// 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())."'";
|
$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);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
// Multilangs
|
// Multilangs
|
||||||
if (!empty($conf->global->MAIN_MULTILANGS)) { // If multilang is enabled
|
if (getDolGlobalInt('MAIN_MULTILANGS')) { // If multilang is enabled
|
||||||
$sql = "SELECT label";
|
$sql = "SELECT label";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||||
$sql .= " WHERE fk_product = ".((int) $obj->rowid);
|
$sql .= " WHERE fk_product = ".((int) $obj->rowid);
|
||||||
|
|||||||
@ -214,7 +214,7 @@ print "</tr>\n";
|
|||||||
if ($mode && $mode != '-1') {
|
if ($mode && $mode != '-1') {
|
||||||
foreach ($infoprod as $prodid => $vals) {
|
foreach ($infoprod as $prodid => $vals) {
|
||||||
// Multilangs
|
// 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 = "SELECT label";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||||
$sql .= " WHERE fk_product = ".((int) $prodid);
|
$sql .= " WHERE fk_product = ".((int) $prodid);
|
||||||
|
|||||||
@ -608,7 +608,7 @@ while ($i < $imaxinloop) {
|
|||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
// Multilangs
|
// 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
|
// TODO Use a cache
|
||||||
$sql = "SELECT label";
|
$sql = "SELECT label";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
$sql .= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user