Fix for backward compatibility
This commit is contained in:
parent
68ac62d09c
commit
3a32787f15
@ -40,6 +40,30 @@
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return dolibarr global constant string value
|
||||||
|
* @param string $key key to return value, return '' if not set
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function getDolGlobalString($key)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
// return $conf->global->$key ?? '';
|
||||||
|
return (string) (empty($conf->global->$key) ? '' : $conf->global->$key);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return dolibarr global constant int value
|
||||||
|
* @param string $key key to return value, return 0 if not set
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
function getDolGlobalInt($key)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
// return $conf->global->$key ?? 0;
|
||||||
|
return (int) (empty($conf->global->$key) ? 0 : $conf->global->$key);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a DoliDB instance (database handler).
|
* Return a DoliDB instance (database handler).
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user