Fix: Restore barcode management
This commit is contained in:
parent
18a7cd1e33
commit
e0f7637bb3
@ -152,8 +152,8 @@ class Conf
|
|||||||
// If this is constant for a sms engine
|
// If this is constant for a sms engine
|
||||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_SMS$/i',$key,$reg))
|
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_SMS$/i',$key,$reg))
|
||||||
{
|
{
|
||||||
$module=strtolower($reg[1]);
|
$modulename=strtolower($reg[1]);
|
||||||
$this->sms_engine_modules[$module]=$module; // Add this module in list of modules that provide SMS
|
$this->sms_engine_modules[$modulename]=$modulename; // Add this module in list of modules that provide SMS
|
||||||
}
|
}
|
||||||
// If this is constant for all generic part activated by a module
|
// If this is constant for all generic part activated by a module
|
||||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_([A-Z]+)$/i',$key,$reg))
|
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_([A-Z]+)$/i',$key,$reg))
|
||||||
@ -164,17 +164,18 @@ class Conf
|
|||||||
if (! is_array($this->$varname)) { $this->$varname = array(); }
|
if (! is_array($this->$varname)) { $this->$varname = array(); }
|
||||||
$arrValue = @unserialize($value);
|
$arrValue = @unserialize($value);
|
||||||
if (is_array($arrValue) && ! empty($arrValue)) $value = $arrValue;
|
if (is_array($arrValue) && ! empty($arrValue)) $value = $arrValue;
|
||||||
else if ($partname == 'models' && $value == 1) $value = dol_buildpath('/'.$modulename);
|
else if ($partname == 'barcode') $value = '/'.$modulename.'/core/modules/'.$partname.'/';
|
||||||
|
else if ($partname == 'models') $value = $modulename.'/';
|
||||||
else $value = ($value == 1 ? '/'.$modulename.'/core/'.$partname.'/' : $value);
|
else $value = ($value == 1 ? '/'.$modulename.'/core/'.$partname.'/' : $value);
|
||||||
$this->$varname = array_merge($this->$varname, array($modulename => $value));
|
$this->$varname = array_merge($this->$varname, array($modulename => $value));
|
||||||
}
|
}
|
||||||
// If this is a module constant (must be at end)
|
// If this is a module constant (must be at end)
|
||||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)$/i',$key,$reg))
|
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)$/i',$key,$reg))
|
||||||
{
|
{
|
||||||
$module=strtolower($reg[1]);
|
$modulename=strtolower($reg[1]);
|
||||||
$this->$module=(object) array();
|
$this->$modulename=(object) array();
|
||||||
$this->$module->enabled=true;
|
$this->$modulename->enabled=true;
|
||||||
$this->modules[]=$module; // Add this module in list of enabled modules
|
$this->modules[]=$modulename; // Add this module in list of enabled modules
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -735,7 +735,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
//Duration
|
// Duration
|
||||||
if ($_GET["type"] == 1)
|
if ($_GET["type"] == 1)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Duration").'</td><td><input name="duration_value" size="6" maxlength="5" value="'.$product->duree.'"> ';
|
print '<tr><td>'.$langs->trans("Duration").'</td><td><input name="duration_value" size="6" maxlength="5" value="'.$product->duree.'"> ';
|
||||||
@ -1083,7 +1083,7 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$object->fetch_barcode();
|
$object->fetch_barcode();
|
||||||
print $object->barcode_type_label?$object->barcode_type_label:'<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>';
|
print $object->barcode_type_label?$object->barcode_type_label:($object->barcode?'<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>':'');
|
||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user