forked from Wavyzz/dolibarr
New: add DOL_CUSTOM_PATH
This commit is contained in:
@@ -84,7 +84,8 @@ $i = 0; // is a sequencer of modules found
|
||||
$j = 0; // j is module number. Automatically affeted if module number not defined.
|
||||
foreach ($conf->file->dol_document_root as $dirroot)
|
||||
{
|
||||
$dir = $dirroot . "/includes/modules/";
|
||||
if (preg_match('/custom$/i',$dirroot)) $dir = $dirroot . "/modules/";
|
||||
else $dir = $dirroot . "/includes/modules/";
|
||||
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
//print $dir."\n<br>";
|
||||
|
||||
@@ -101,9 +101,10 @@ if (empty($dolibarr_main_data_root))
|
||||
}
|
||||
|
||||
// Define some constants
|
||||
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem pages php (htdocs)
|
||||
define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem donnes (documents)
|
||||
define('DOL_CLASS_PATH', 'class/'); // Filsystem path to class dir
|
||||
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem core php (htdocs)
|
||||
define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem data (documents)
|
||||
define('DOL_CLASS_PATH', 'class/'); // Filesystem path to class dir
|
||||
define('DOL_CUSTOM_PATH', $dolibarr_main_document_root.'/custom'); // Filesystem path to custom dir
|
||||
// If dolibarr_main_url_root = auto (Hidden feature for developers only), we try to forge it.
|
||||
if ($dolibarr_main_url_root == 'auto' && ! empty($_SERVER["SCRIPT_URL"]) && ! empty($_SERVER["SCRIPT_URI"]))
|
||||
{
|
||||
@@ -187,7 +188,7 @@ $conf->file->character_set_client=strtoupper($force_charset_do_notuse);
|
||||
$conf->file->cookie_cryptkey = empty($dolibarr_main_cookie_cryptkey)?'':$dolibarr_main_cookie_cryptkey;
|
||||
|
||||
// Define array of document root directories
|
||||
$conf->file->dol_document_root=array(DOL_DOCUMENT_ROOT);
|
||||
$conf->file->dol_document_root=array(DOL_DOCUMENT_ROOT, DOL_CUSTOM_PATH);
|
||||
if (! empty($dolibarr_main_document_root_alt))
|
||||
{
|
||||
// dolibarr_main_document_root_alt contains several directories
|
||||
|
||||
Reference in New Issue
Block a user