';
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index c5388f367b1..c5ce86c4e8c 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -281,7 +281,7 @@ class Translate
// Using a memcached server
if (isModEnabled('memcached') && getDolGlobalString('MEMCACHED_SERVER')) {
$usecachekey = $newdomain . '_' . $langofdir . '_' . md5($file_lang); // Should not contains special chars
- } elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) {
+ } elseif (getDolGlobalInt('MAIN_OPTIMIZE_SPEED') & 0x02) {
// Using cache with shmop. Speed gain: 40ms - Memory overusage: 200ko (Size of session cache file)
$usecachekey = $newdomain;
}
@@ -473,7 +473,7 @@ class Translate
// Using a memcached server
if (isModEnabled('memcached') && getDolGlobalString('MEMCACHED_SERVER')) {
$usecachekey = $newdomain . '_' . $langofdir; // Should not contains special chars
- } elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) {
+ } elseif (getDolGlobalInt('MAIN_OPTIMIZE_SPEED') & 0x02) {
// Using cache with shmop. Speed gain: 40ms - Memory overusage: 200ko (Size of session cache file)
$usecachekey = $newdomain;
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index b706c895368..afcf18ceebd 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -10349,7 +10349,7 @@ function printCommonFooter($zone = 'private')
if (getDolGlobalString('MEMCACHED_SERVER')) {
print 'MEMCACHED_SERVER=' . getDolGlobalString('MEMCACHED_SERVER').' - ';
}
- print 'MAIN_OPTIMIZE_SPEED='.(isset($conf->global->MAIN_OPTIMIZE_SPEED) ? $conf->global->MAIN_OPTIMIZE_SPEED : 'off');
+ print 'MAIN_OPTIMIZE_SPEED=' . getDolGlobalString('MAIN_OPTIMIZE_SPEED', 'off');
if (!empty($micro_start_time)) { // Works only if MAIN_SHOW_TUNING_INFO is defined at $_SERVER level. Not in global variable.
$micro_end_time = microtime(true);
print ' - Build time: '.ceil(1000 * ($micro_end_time - $micro_start_time)).' ms';
diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php
index c4d7ddac7e9..54b3bdeffd3 100644
--- a/htdocs/core/lib/memory.lib.php
+++ b/htdocs/core/lib/memory.lib.php
@@ -118,7 +118,7 @@ function dol_setcache($memoryid, $data, $expire = 0)
} else {
return -1;
}
- } elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { // This is a really not reliable cache ! Use Memcached instead.
+ } elseif (getDolGlobalInt('MAIN_OPTIMIZE_SPEED') & 0x02) { // This is a really not reliable cache ! Use Memcached instead.
// Using shmop
$result = dol_setshmop($memoryid, $data, $expire);
} else {
@@ -194,7 +194,7 @@ function dol_getcache($memoryid)
} else {
return null; // There is no way to make a difference between NOTFOUND and error when using Memcache. So do not use it, use Memcached instead.
}
- } elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { // This is a really not reliable cache ! Use Memcached instead.
+ } elseif (getDolGlobalInt('MAIN_OPTIMIZE_SPEED') & 0x02) { // This is a really not reliable cache ! Use Memcached instead.
// Using shmop
$data = dol_getshmop($memoryid);
return $data;
diff --git a/htdocs/datapolicy/admin/setup.php b/htdocs/datapolicy/admin/setup.php
index fe4b0632781..e094f9ac53a 100644
--- a/htdocs/datapolicy/admin/setup.php
+++ b/htdocs/datapolicy/admin/setup.php
@@ -145,7 +145,7 @@ if ($action == 'edit') {
print '
';
print '
';
print '
';
diff --git a/htdocs/datapolicy/class/datapolicy.class.php b/htdocs/datapolicy/class/datapolicy.class.php
index 21753e0598f..43498d01606 100644
--- a/htdocs/datapolicy/class/datapolicy.class.php
+++ b/htdocs/datapolicy/class/datapolicy.class.php
@@ -188,10 +188,10 @@ class DataPolicy
$la = 'TXTLINKDATAPOLICYACCEPT_'.$l;
$lr = 'TXTLINKDATAPOLICYREFUSE_'.$l;
- $subject = $conf->global->$s;
- $message = $conf->global->$ma;
- $linka = $conf->global->$la;
- $linkr = $conf->global->$lr;
+ $subject = getDolGlobalString($s);
+ $message = getDolGlobalString($ma);
+ $linka = getDolGlobalString($la);
+ $linkr = getDolGlobalString($lr);
$sendtocc = $sendtobcc = '';
$filepath = $mimetype = $filename = array();
$deliveryreceipt = 0;
@@ -267,10 +267,10 @@ class DataPolicy
$la = 'TXTLINKDATAPOLICYACCEPT_'.$l;
$lr = 'TXTLINKDATAPOLICYREFUSE_'.$l;
- $subject = $conf->global->$s;
- $message = $conf->global->$ma;
- $linka = $conf->global->$la;
- $linkr = $conf->global->$lr;
+ $subject = getDolGlobalString($s);
+ $message = getDolGlobalString($ma);
+ $linka = getDolGlobalString($la);
+ $linkr = getDolGlobalString($lr);
$sendtocc = $sendtobcc = '';
$filepath = $mimetype = $filename = array();
$deliveryreceipt = 0;
@@ -342,10 +342,10 @@ class DataPolicy
$la = 'TXTLINKDATAPOLICYACCEPT_'.$l;
$lr = 'TXTLINKDATAPOLICYREFUSE_'.$l;
- $subject = $conf->global->$s;
- $message = $conf->global->$ma;
- $linka = $conf->global->$la;
- $linkr = $conf->global->$lr;
+ $subject = getDolGlobalString($s);
+ $message = getDolGlobalString($ma);
+ $linka = getDolGlobalString($la);
+ $linkr = getDolGlobalString($lr);
$sendtocc = $sendtobcc = '';
$filepath = $mimetype = $filename = array();
$deliveryreceipt = 0;
diff --git a/htdocs/dav/dav.lib.php b/htdocs/dav/dav.lib.php
index 9babbabbe83..31ef0a304c9 100644
--- a/htdocs/dav/dav.lib.php
+++ b/htdocs/dav/dav.lib.php
@@ -32,8 +32,8 @@ if (!defined('CDAV_CONTACT_TAG')) {
// define CDAV_URI_KEY if not
if (!defined('CDAV_URI_KEY')) {
- if (isset($conf->global->CDAV_URI_KEY)) {
- define('CDAV_URI_KEY', $conf->global->CDAV_URI_KEY);
+ if (getDolGlobalString('CDAV_URI_KEY')) {
+ define('CDAV_URI_KEY', getDolGlobalString('CDAV_URI_KEY'));
} else {
define('CDAV_URI_KEY', substr(md5($_SERVER['HTTP_HOST']), 0, 8));
}
diff --git a/htdocs/debugbar/class/DataCollector/DolibarrCollector.php b/htdocs/debugbar/class/DataCollector/DolibarrCollector.php
index 98cb42b0834..aedd83f3c4c 100644
--- a/htdocs/debugbar/class/DataCollector/DolibarrCollector.php
+++ b/htdocs/debugbar/class/DataCollector/DolibarrCollector.php
@@ -87,7 +87,7 @@ class DolibarrCollector extends DataCollector implements Renderable, AssetProvid
$info .= $langs->trans('Locale').': ' . getDolGlobalString('MAIN_LANG_DEFAULT').' ';
$info .= $langs->trans('Currency').': '.$conf->currency.' ';
$info .= $langs->trans('Entity').': '.$conf->entity.' ';
- $info .= $langs->trans('MaxSizeList').': '.($conf->liste_limit ?: $conf->global->MAIN_SIZE_LISTE_LIMIT).' ';
+ $info .= $langs->trans('MaxSizeList').': '.($conf->liste_limit ?: getDolGlobalString('MAIN_SIZE_LISTE_LIMIT')).' ';
$info .= $langs->trans('MaxSizeForUploadedFiles').': ' . getDolGlobalString('MAIN_UPLOAD_DOC').' ';
$info .= '$dolibarr_main_prod = '.$dolibarr_main_prod.' ';
$info .= '$dolibarr_nocsrfcheck = '.$dolibarr_nocsrfcheck.' ';
diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
index 126f2e66941..3d15efd5612 100644
--- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php
+++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
@@ -75,7 +75,7 @@ class ConferenceOrBoothAttendee extends CommonObject
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'picto' is code of a picto to show before value in forms
- * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
+ * 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalString("MY_SETUP_PARAM")')
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
@@ -210,7 +210,7 @@ class ConferenceOrBoothAttendee extends CommonObject
if (isset($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE)
&& getDolGlobalString('EVENTORGANIZATION_FILTERATTENDEES_TYPE') !== ''
&& getDolGlobalString('EVENTORGANIZATION_FILTERATTENDEES_TYPE') !== '-1') {
- $this->fields['fk_soc']['type'] .= ' AND client = '.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE;
+ $this->fields['fk_soc']['type'] .= ' AND client = '.((int) getDolGlobalInt('EVENTORGANIZATION_FILTERATTENDEES_TYPE', 0));
}
// Example to show how to set values of fields definition dynamically
@@ -533,7 +533,7 @@ class ConferenceOrBoothAttendee extends CommonObject
*/
public function validate($user, $notrigger = 0)
{
- global $conf, $langs;
+ global $conf;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -545,14 +545,6 @@ class ConferenceOrBoothAttendee extends CommonObject
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->conferenceorboothattendee->write))
- || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->conferenceorboothattendee->conferenceorboothattendee_advance->validate))))
- {
- $this->error='NotEnoughPermissions';
- dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
- return -1;
- }*/
-
$now = dol_now();
$this->db->begin();
@@ -696,13 +688,6 @@ class ConferenceOrBoothAttendee extends CommonObject
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->write))
- || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->eventorganization_advance->validate))))
- {
- $this->error='Permission denied';
- return -1;
- }*/
-
return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'CONFERENCEORBOOTHATTENDEE_UNVALIDATE');
}
@@ -720,13 +705,6 @@ class ConferenceOrBoothAttendee extends CommonObject
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->write))
- || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->eventorganization_advance->validate))))
- {
- $this->error='Permission denied';
- return -1;
- }*/
-
return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'CONFERENCEORBOOTHATTENDEE_CANCEL');
}
@@ -744,13 +722,6 @@ class ConferenceOrBoothAttendee extends CommonObject
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->write))
- || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->eventorganization_advance->validate))))
- {
- $this->error='Permission denied';
- return -1;
- }*/
-
return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'CONFERENCEORBOOTHATTENDEE_REOPEN');
}
diff --git a/htdocs/externalsite/frames.php b/htdocs/externalsite/frames.php
index d6f2c4a07dd..97bfcaa108f 100644
--- a/htdocs/externalsite/frames.php
+++ b/htdocs/externalsite/frames.php
@@ -22,8 +22,8 @@
* \brief Page that build two frames: One for menu, the other for the target page to show
* Usage:
* /externalsite/frames.php to show URL set into setup
- * /externalsite/frames.php?keyforcontent=EXTERNAL_SITE_CONTENT_abc to show html text defined into $conf->global->EXTERNAL_SITE_CONTENT_abc
- * /externalsite/frames.php?keyforcontent=EXTERNAL_SITE_URL_abc to show URL defined into $conf->global->EXTERNAL_SITE_URL_abc
+ * /externalsite/frames.php?keyforcontent=EXTERNAL_SITE_CONTENT_abc to show html text defined into conf 'EXTERNAL_SITE_CONTENT_abc'
+ * /externalsite/frames.php?keyforcontent=EXTERNAL_SITE_URL_abc to show URL defined into conf 'EXTERNAL_SITE_URL_abc'
*/
// Load Dolibarr environment
diff --git a/htdocs/fichinter/agenda.php b/htdocs/fichinter/agenda.php
index b7d1d31a14e..8a2e9ddd34f 100644
--- a/htdocs/fichinter/agenda.php
+++ b/htdocs/fichinter/agenda.php
@@ -124,7 +124,6 @@ $form = new Form($db);
if ($object->id > 0) {
$title = $langs->trans("Agenda");
- //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
$help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung';
llxHeader('', $title, $help_url);
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index d17e76a0b5f..9ef74828067 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -232,7 +232,7 @@ class CommandeFournisseur extends CommonOrder
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'picto' is code of a picto to show before value in forms
- * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or 'isModEnabled("multicurrency")' ...)
+ * 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalString("MY_SETUP_PARAM")' or 'isModEnabled("multicurrency")' ...)
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 708a977677e..b1b7292b160 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -2509,7 +2509,7 @@ if ($action == 'create') {
}
}
// Create event
- /*if (isModEnabled('agenda') && !empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page.
+ /*if (isModEnabled('agenda') && getDolGlobalString('MAIN_ADD_EVENT_ON_ELEMENT_CARD')) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page.
{
print '
';
}*/
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 7411a7e9166..964efebdde6 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -324,7 +324,7 @@ if (empty($reshook)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
- if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
+ if (!getDolGlobalStringempty('MAIN_DISABLE_PDF_AUTOUPDATE')) {
$ret = $object->fetch($object->id); // Reload to get new records
$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
}*/
@@ -4113,7 +4113,7 @@ if ($action == 'create') {
}
// Create event
- /*if (isModEnabled('agenda') && !empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page.
+ /*if (isModEnabled('agenda') && getDolGlobalString('MAIN_ADD_EVENT_ON_ELEMENT_CARD')) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page.
{
print '
';
}*/
diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php
index 8e0b6457e6f..4f7cc31e9f2 100644
--- a/htdocs/fourn/facture/index.php
+++ b/htdocs/fourn/facture/index.php
@@ -41,9 +41,9 @@ if (isset($user->socid) && $user->socid > 0) {
$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
// Maximum elements of the tables
-$maxDraftCount = !getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD;
+$maxDraftCount = getDolGlobalInt('MAIN_MAXLIST_OVERLOAD', 500);
$maxLatestEditCount = 5;
-$maxOpenCount = !getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD;
+$maxOpenCount = getDolGlobalInt('MAIN_MAXLIST_OVERLOAD', 500);
// Security check
restrictedArea($user, 'fournisseur', 0, '', 'facture');
diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php
index 5e8cd595229..41151aecbaf 100644
--- a/htdocs/hrm/class/evaluation.class.php
+++ b/htdocs/hrm/class/evaluation.class.php
@@ -79,7 +79,7 @@ class Evaluation extends CommonObject
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'picto' is code of a picto to show before value in forms
- * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
+ * 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalString("MY_SETUP_PARAM")')
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php
index 2778ac9e76c..e4ae138a5f5 100644
--- a/htdocs/hrm/class/evaluationdet.class.php
+++ b/htdocs/hrm/class/evaluationdet.class.php
@@ -78,7 +78,7 @@ class EvaluationLine extends CommonObjectLine
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'picto' is code of a picto to show before value in forms
- * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
+ * 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalString("MY_SETUP_PARAM")')
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php
index 2a306d5b8be..9fb536f0fa9 100644
--- a/htdocs/hrm/class/job.class.php
+++ b/htdocs/hrm/class/job.class.php
@@ -77,7 +77,7 @@ class Job extends CommonObject
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'picto' is code of a picto to show before value in forms
- * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
+ * 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalString("MY_SETUP_PARAM")')
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php
index a1bd5183cae..127419f6ab3 100644
--- a/htdocs/hrm/class/position.class.php
+++ b/htdocs/hrm/class/position.class.php
@@ -77,7 +77,7 @@ class Position extends CommonObject
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'picto' is code of a picto to show before value in forms
- * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
+ * 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalString("MY_SETUP_PARAM")')
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php
index bc9998adf82..1961d4bfd0c 100644
--- a/htdocs/hrm/class/skill.class.php
+++ b/htdocs/hrm/class/skill.class.php
@@ -83,7 +83,7 @@ class Skill extends CommonObject
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'picto' is code of a picto to show before value in forms
- * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
+ * 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalString("MY_SETUP_PARAM")')
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php
index e658e75b265..7a96a2d8230 100644
--- a/htdocs/hrm/class/skilldet.class.php
+++ b/htdocs/hrm/class/skilldet.class.php
@@ -77,7 +77,7 @@ class Skilldet extends CommonObjectLine
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'picto' is code of a picto to show before value in forms
- * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
+ * 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalString("MY_SETUP_PARAM")')
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php
index dffb5600e46..27fd705a127 100644
--- a/htdocs/hrm/class/skillrank.class.php
+++ b/htdocs/hrm/class/skillrank.class.php
@@ -79,7 +79,7 @@ class SkillRank extends CommonObject
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'picto' is code of a picto to show before value in forms
- * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM)
+ * 'enabled' is a condition when the field must be managed (Example: 1 or 'getDolGlobalString("MY_SETUP_PARAM")')
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
diff --git a/htdocs/index.php b/htdocs/index.php
index d6b588e7e5d..160549efa04 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -793,7 +793,7 @@ $db->close();
/**
* Show weather logo. Logo to show depends on $totallate and values for
- * $conf->global->MAIN_METEO_LEVELx
+ * conf 'MAIN_METEO_LEVELx'
*
* @param int $totallate Nb of element late
* @param string $text Text to show on logo
@@ -811,23 +811,20 @@ function showWeather($totallate, $text, $options, $morecss = '')
/**
- * get weather level
- * $conf->global->MAIN_METEO_LEVELx
+ * get weather status for conf 'MAIN_METEO_LEVELx'
*
* @param int $totallate Nb of element late
* @return stdClass Return img tag of weather
*/
function getWeatherStatus($totallate)
{
- global $conf;
-
$weather = new stdClass();
$weather->picto = '';
$offset = 0;
$factor = 10; // By default
- $used_conf = !getDolGlobalString('MAIN_USE_METEO_WITH_PERCENTAGE') ? 'MAIN_METEO_LEVEL' : 'MAIN_METEO_PERCENTAGE_LEVEL';
+ $used_conf = (getDolGlobalString('MAIN_USE_METEO_WITH_PERCENTAGE') ? 'MAIN_METEO_PERCENTAGE_LEVEL' : 'MAIN_METEO_LEVEL');
$weather->level = 0;
$level0 = $offset;
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index ebf279599e9..cc217d97a8e 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1716,10 +1716,6 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
print ''."\n"; // Not required into an Android webview
}
- //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n";
- //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n";
- //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n";
-
// Mobile appli like icon
$manifest = DOL_URL_ROOT.'/theme/'.$conf->theme.'/manifest.json.php';
if (!empty($manifest)) {
@@ -3363,7 +3359,7 @@ function main_area($title = '')
print '
'."\n";
@@ -3674,7 +3670,7 @@ if (!function_exists("llxFooter")) {
print "\n".''."\n";
print "\n\n";
- $url_for_ping = (!getDolGlobalString('MAIN_URL_FOR_PING') ? "https://ping.dolibarr.org/" : $conf->global->MAIN_URL_FOR_PING);
+ $url_for_ping = getDolGlobalString('MAIN_URL_FOR_PING', "https://ping.dolibarr.org/");
// Try to guess the distrib used
$distrib = 'standard';
if ($_SERVER["SERVER_ADMIN"] == 'doliwamp@localhost') {
diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php
index e5ff0cc237f..7ac5b569dbf 100644
--- a/htdocs/master.inc.php
+++ b/htdocs/master.inc.php
@@ -203,7 +203,7 @@ if (session_id() && !empty($_SESSION["dol_entity"])) {
if (!is_numeric($conf->entity)) {
$conf->entity = 1;
}
-// Here we read database (llx_const table) and define $conf->global->XXX var.
+// Here we read database (llx_const table) and define conf var $conf->global->XXX.
//print "We work with data into entity instance number '".$conf->entity."'";
$conf->setValues($db);
@@ -255,7 +255,7 @@ if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC')) {
}
-// Set default language (must be after the setValues setting global $conf->global->MAIN_LANG_DEFAULT. Page main.inc.php will overwrite langs->defaultlang with user value later)
+// Set default language (must be after the setValues setting global conf 'MAIN_LANG_DEFAULT'. Page main.inc.php will overwrite langs->defaultlang with user value later)
if (!defined('NOREQUIRETRAN')) {
$langcode = (GETPOST('lang', 'aZ09') ? GETPOST('lang', 'aZ09', 1) : getDolGlobalString('MAIN_LANG_DEFAULT', 'auto'));
if (defined('MAIN_LANG_DEFAULT')) { // So a page can force the language whatever is setup and parameters in URL