|
@@ -521,7 +521,7 @@ if ($action == 'edit') {
|
|
|
$arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel;
|
|
|
}
|
|
|
}
|
|
|
- print $form->selectarray($constname, $arrayofmessagename, $conf->global->{$constname}, 'None', 0, 0, '', 0, 0, 0, '', '', 1);
|
|
|
+ print $form->selectarray($constname, $arrayofmessagename, getDolGlobalString($constname), 'None', 0, 0, '', 0, 0, 0, '', '', 1);
|
|
|
} elseif (preg_match('/category:/', $val['type'])) {
|
|
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
|
@@ -529,13 +529,13 @@ if ($action == 'edit') {
|
|
|
|
|
|
$tmp = explode(':', $val['type']);
|
|
|
print img_picto('', 'category', 'class="pictofixedwidth"');
|
|
|
- print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort'));
|
|
|
+ print $formother->select_categories($tmp[1], getDolGlobalString($constname), $constname, 0, $langs->trans('CustomersProspectsCategoriesShort'));
|
|
|
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
|
|
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
|
|
|
$formcompany = new FormCompany($db);
|
|
|
- print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname);
|
|
|
+ print $formcompany->selectProspectCustomerType(getDolGlobalString($constname), $constname);
|
|
|
} elseif ($val['type'] == 'securekey') {
|
|
|
- print '<input required="required" type="text" class="flat" id="' . $constname . '" name="' . $constname . '" value="' . (GETPOST($constname, 'alpha') ? GETPOST($constname, 'alpha') : $conf->global->{$constname}) . '" size="40">';
|
|
|
+ print '<input required="required" type="text" class="flat" id="' . $constname . '" name="' . $constname . '" value="' . (GETPOST($constname, 'alpha') ? GETPOST($constname, 'alpha') : getDolGlobalString($constname)) . '" size="40">';
|
|
|
if (!empty($conf->use_javascript_ajax)) {
|
|
|
print ' ' . img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token' . $constname . '" class="linkobject"');
|
|
|
}
|
|
@@ -549,7 +549,7 @@ if ($action == 'edit') {
|
|
|
$form->select_produits($selected, $constname, '', 0);
|
|
|
}
|
|
|
} else {
|
|
|
- print '<input name="' . $constname . '" class="flat ' . (empty($val['css']) ? 'minwidth200' : $val['css']) . '" value="' . $conf->global->{$constname} . '">';
|
|
|
+ print '<input name="' . $constname . '" class="flat ' . (empty($val['css']) ? 'minwidth200' : $val['css']) . '" value="' . getDolGlobalString($constname) . '">';
|
|
|
}
|
|
|
print '</td></tr>';
|
|
|
}
|
|
@@ -605,18 +605,18 @@ if ($action == 'edit') {
|
|
|
}
|
|
|
print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
|
|
|
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
|
|
- if ($conf->global->{$constname}==2) {
|
|
|
+ if (getDolGlobalString($constname) == 2) {
|
|
|
print $langs->trans("Prospect");
|
|
|
- } elseif ($conf->global->{$constname}==3) {
|
|
|
+ } elseif (getDolGlobalString($constname) == 3) {
|
|
|
print $langs->trans("ProspectCustomer");
|
|
|
- } elseif ($conf->global->{$constname}==1) {
|
|
|
+ } elseif (getDolGlobalString($constname) == 1) {
|
|
|
print $langs->trans("Customer");
|
|
|
- } elseif ($conf->global->{$constname}==0) {
|
|
|
+ } elseif (getDolGlobalString($constname) == 0) {
|
|
|
print $langs->trans("NorProspectNorCustomer");
|
|
|
}
|
|
|
} elseif ($val['type'] == 'product') {
|
|
|
$product = new Product($db);
|
|
|
- $resprod = $product->fetch($conf->global->{$constname});
|
|
|
+ $resprod = $product->fetch(getDolGlobalString($constname));
|
|
|
if ($resprod > 0) {
|
|
|
print $product->ref;
|
|
|
} elseif ($resprod < 0) {
|