1
1
Fork 0

log call to hooks in debug

This commit is contained in:
fabrixxm 2015-08-06 16:06:18 +02:00
parent 47d9208ae9
commit f9e61f20cc

View file

@ -162,6 +162,8 @@ function call_hooks($name, &$data = null) {
$a = get_app(); $a = get_app();
#logger($name, LOGGER_ALL);
if((is_array($a->hooks)) && (array_key_exists($name,$a->hooks))) { if((is_array($a->hooks)) && (array_key_exists($name,$a->hooks))) {
foreach($a->hooks[$name] as $hook) { foreach($a->hooks[$name] as $hook) {
// Don't run a theme's hook if the user isn't using the theme // Don't run a theme's hook if the user isn't using the theme
@ -171,6 +173,7 @@ function call_hooks($name, &$data = null) {
@include_once($hook[0]); @include_once($hook[0]);
if(function_exists($hook[1])) { if(function_exists($hook[1])) {
$func = $hook[1]; $func = $hook[1];
logger($name." => ".$hook[0].":".$func."()", LOGGER_DEBUG);
$func($a,$data); $func($a,$data);
} }
else { else {