mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Clean code
This commit is contained in:
parent
de4ebc34cc
commit
5ddf992838
|
|
@ -233,7 +233,7 @@ if (isModEnabled('product')) {
|
|||
print '</td>';
|
||||
print '<td class="nowrap">'.$modBarCode->getExample($langs)."</td>\n";
|
||||
|
||||
if (getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM') && $conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") {
|
||||
if (getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM') == "$file") {
|
||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&token='.newToken().'&value='.urlencode($file).'">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ if (getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
|
|||
if (preg_match('/^mod_barcode_product_.*php$/', $file)) {
|
||||
$file = substr($file, 0, dol_strlen($file) - 4);
|
||||
|
||||
if ($file == $conf->global->BARCODE_PRODUCT_ADDON_NUM) {
|
||||
if ($file == getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
|
||||
try {
|
||||
dol_include_once($dirroot.$file.'.php');
|
||||
} catch (Exception $e) {
|
||||
|
|
|
|||
|
|
@ -1279,7 +1279,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-card');
|
|||
// Load object modBarCodeProduct
|
||||
$res = 0;
|
||||
if (isModEnabled('barcode') && getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
|
||||
$module = strtolower($conf->global->BARCODE_PRODUCT_ADDON_NUM);
|
||||
$module = strtolower(getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM'));
|
||||
$dirbarcode = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
|
||||
foreach ($dirbarcode as $dirroot) {
|
||||
$res = dol_include_once($dirroot.$module.'.php');
|
||||
|
|
|
|||
|
|
@ -1036,7 +1036,7 @@ class Product extends CommonObject
|
|||
// phpcs:enable
|
||||
global $conf;
|
||||
if (isModEnabled('barcode') && getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
|
||||
$module = strtolower($conf->global->BARCODE_PRODUCT_ADDON_NUM);
|
||||
$module = strtolower(getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM'));
|
||||
|
||||
$dirsociete = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
|
||||
foreach ($dirsociete as $dirroot) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user