diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 6a4eb772ef7..d7c09a7b180 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -208,9 +208,9 @@ if (isModEnabled('barcode')) { $fieldstosearchall['p.barcode'] = 'Gencod'; $fieldstosearchall['pfp.barcode'] = 'GencodBuyPrice'; } -// Personalized search criteria. Example: $conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS = 'p.ref=ProductRef;p.label=ProductLabel;p.description=Description;p.note=Note;' +// Personalized search criteria. Example: getDolGlobalString('PRODUCT_QUICKSEARCH_ON_FIELDS') = 'p.ref=ProductRef;p.label=ProductLabel;p.description=Description;p.note=Note;' if (getDolGlobalString('PRODUCT_QUICKSEARCH_ON_FIELDS')) { - $fieldstosearchall = dolExplodeIntoArray($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS); + $fieldstosearchall = dolExplodeIntoArray(getDolGlobalString('PRODUCT_QUICKSEARCH_ON_FIELDS')); } if (!getDolGlobalString('PRODUIT_MULTIPRICES')) { @@ -293,10 +293,11 @@ $arrayfields = array( // MultiPrices if (getDolGlobalString('PRODUIT_MULTIPRICES')) { - for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { + $produit_multiprices_limit = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); + for ($i = 1; $i <= $produit_multiprices_limit; $i++) { $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i; - if (!empty($conf->global->$keyforlabel)) { - $labelp = $i.' - '.$langs->transnoentitiesnoconv($conf->global->$keyforlabel); + if (!empty(getDolGlobalString('$keyforlabel'))) { + $labelp = $i.' - '.$langs->transnoentitiesnoconv(getDolGlobalString('$keyforlabel')); } else { $labelp = $langs->transnoentitiesnoconv("SellingPrice")." ".$i; }