Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/utility/unit_config_reader.php
Show First 20 Lines • Show All 473 Lines • ▼ Show 20 Line(s) | |||||
if ( !isset($config['Hooks']) || !$config['Hooks'] ) { | if ( !isset($config['Hooks']) || !$config['Hooks'] ) { | ||||
return ; | return ; | ||||
} | } | ||||
$hooks = $config['Hooks']; | $hooks = $config['Hooks']; | ||||
foreach ($hooks as $hook) { | foreach ($hooks as $hook) { | ||||
// Don't attempt to register a hook to a module isn't installed. | |||||
if ( isset($hook['HookToModule']) && !isset($this->Application->ModuleInfo[$hook['HookToModule']]) ) { | |||||
continue; | |||||
} | |||||
if ( isset($config['ParentPrefix']) && ($hook['HookToPrefix'] == $config['ParentPrefix']) ) { | if ( isset($config['ParentPrefix']) && ($hook['HookToPrefix'] == $config['ParentPrefix']) ) { | ||||
trigger_error('Depricated Hook Usage [prefix: <strong>' . $config['Prefix'] . '</strong>; do_prefix: <strong>' . $hook['DoPrefix'] . '</strong>] use <strong>#PARENT#</strong> as <strong>HookToPrefix</strong> value, where HookToPrefix is same as ParentPrefix', defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_NOTICE); | trigger_error('Depricated Hook Usage [prefix: <strong>' . $config['Prefix'] . '</strong>; do_prefix: <strong>' . $hook['DoPrefix'] . '</strong>] use <strong>#PARENT#</strong> as <strong>HookToPrefix</strong> value, where HookToPrefix is same as ParentPrefix', defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_NOTICE); | ||||
} | } | ||||
if ($hook['HookToPrefix'] == '') { | if ($hook['HookToPrefix'] == '') { | ||||
// new: set hooktoprefix to current prefix if not set | // new: set hooktoprefix to current prefix if not set | ||||
$hook['HookToPrefix'] = $config['Prefix']; | $hook['HookToPrefix'] = $config['Prefix']; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 555 Lines • Show Last 20 Lines |