Fix: restore broken feature (hooks)
This commit is contained in:
parent
df28f09286
commit
315fba37fc
@ -52,13 +52,11 @@ class Conf
|
||||
public $smart_menu;
|
||||
|
||||
public $modules = array(); // List of activated modules
|
||||
public $modules_parts = array('js'=>array(),'triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array()); // List of modules parts
|
||||
public $modules_parts = array('js'=>array(),'triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array(),'hooks'=>array()); // List of modules parts
|
||||
|
||||
// TODO Remove thoose arrays with generic module_parts
|
||||
public $tabs_modules = array();
|
||||
public $sms_engine_modules = array();
|
||||
// TODO Remove thoose arrays with generic module_parts
|
||||
public $hooks_modules = array();
|
||||
public $societe_modules = array();
|
||||
|
||||
var $logbuffer = array();
|
||||
@ -202,7 +200,7 @@ class Conf
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
//var_dump($this->modules);
|
||||
|
||||
@ -70,14 +70,14 @@ class HookManager
|
||||
global $conf;
|
||||
|
||||
// Test if there is hooks to manage
|
||||
if (! is_array($conf->hooks_modules) || empty($conf->hooks_modules)) return;
|
||||
if (! is_array($conf->modules_parts['hooks']) || empty($conf->modules_parts['hooks'])) return;
|
||||
|
||||
// For backward compatibility
|
||||
if (! is_array($arraycontext)) $arraycontext=array($arraycontext);
|
||||
|
||||
$this->contextarray=array_unique(array_merge($arraycontext,$this->contextarray)); // All contexts are concatenated
|
||||
|
||||
foreach($conf->hooks_modules as $module => $hooks)
|
||||
foreach($conf->modules_parts['hooks'] as $module => $hooks)
|
||||
{
|
||||
if ($conf->$module->enabled)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user