qual: use getDolGlobalString() for product/list.php (#30111)
* qual: use getDolGlobalString() for product/list.php * fix phan warning Avoid function calls in a FOR loop test part
This commit is contained in:
parent
162fc23c6f
commit
ded570e23a
1 changed files with 6 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue