Index: trunk/core/kernel/utility/unit_config_reader.php =================================================================== diff -u -r4016 -r4309 --- trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 4016) +++ trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 4309) @@ -326,8 +326,22 @@ } } - if ( is_array(getArrayValue($config, 'Hooks')) ) { - foreach ($config['Hooks'] as $hook) { + $hooks = getArrayValue($config, 'Hooks'); + if (is_array($hooks) && count($hooks) > 0) { + foreach ($hooks as $hook) { + if (isset($config['ParentPrefix']) && $hook['HookToPrefix'] == $config['ParentPrefix']) { + trigger_error('Depricated Hook Usage [prefix: '.$config['Prefix'].'; do_prefix: '.$hook['DoPrefix'].'] use #PARENT# and HookToPrefix value where HookToPrefix is same as ParentPrefix', E_USER_NOTICE); + } + + if ($hook['HookToPrefix'] == '') { + $hook['HookToPrefix'] = $config['Prefix']; // new: set hooktoprefix to current prefix if not set + } + + if (isset($config['ParentPrefix']) && $hook['HookToPrefix'] == '#PARENT#') { + // new: allow to set hook to parent prefix what ever it is + $hook['HookToPrefix'] = $config['ParentPrefix']; + } + $do_prefix = $hook['DoPrefix'] == '' ? $config['Prefix'] : $hook['DoPrefix']; if ( !is_array($hook['HookToEvent']) ) {