Fix: full path is defined by default
This commit is contained in:
parent
e536bef00e
commit
ee80305e6c
@ -69,15 +69,15 @@ class modMyModule extends DolibarrModules
|
||||
$this->picto='generic';
|
||||
|
||||
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
|
||||
// for default path (eg: /mymodule/core/triggers) (0=disable, 1=enable)
|
||||
// for specific path of parts (eg: /core/modules/barcode)
|
||||
// for specific css file (eg: /css/mymodule.css.php)
|
||||
// for default path (eg: /mymodule/core/xxxxx) (0=disable, 1=enable)
|
||||
// for specific path of parts (eg: /mymodule/core/modules/barcode)
|
||||
// for specific css file (eg: /mymodule/css/mymodule.css.php)
|
||||
//$this->module_parts = array( 'triggers' => 1,
|
||||
// 'login' => 0,
|
||||
// 'substitutions' => 0,
|
||||
// 'menus' => 0,
|
||||
// 'css' => '/css/mymodule.css.php',
|
||||
// 'barcode' => '/path/to/your/parts',
|
||||
// 'css' => '/mymodule/css/mymodule.css.php',
|
||||
// 'barcode' => '/mymodule/path/to/your/parts',
|
||||
// 'hooks' => array('hookcontext1','hookcontext2'));
|
||||
$this->module_parts = array();
|
||||
|
||||
|
||||
@ -165,13 +165,6 @@ class Conf
|
||||
$this->hooks_modules[$modulename][]=$value;
|
||||
}
|
||||
}
|
||||
// If this is constant for a css file activated by a module
|
||||
// TODO obsolete (see generic parts)
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_CSS$/i',$key,$reg))
|
||||
{
|
||||
$modulename = strtolower($reg[1]);
|
||||
$this->css_modules[$modulename]=$value;
|
||||
}
|
||||
// If this is constant for triggers activated by a module
|
||||
// TODO obsolete (see generic parts)
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_BARCODE$/i',$key,$reg))
|
||||
@ -187,7 +180,7 @@ class Conf
|
||||
$varname = $partname.'_modules';
|
||||
$arrValue = unserialize($value);
|
||||
if (is_array($arrValue) && ! empty($arrValue)) $value = $arrValue;
|
||||
else $value = ($value == 1 ? '/'.$modulename.'/core/'.$partname.'/' : '/'.$modulename.$value);
|
||||
else $value = ($value == 1 ? '/'.$modulename.'/core/'.$partname.'/' : $value);
|
||||
$this->$varname = array_merge($this->$varname, array($modulename => $value));
|
||||
}
|
||||
// If this is a module constant (must be at end)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user