global $wgHooks;
$fname = 'wfRunHooks';
- wfProfileIn( $fname );
if (!is_array($wgHooks)) {
wfDebugDieBacktrace("Global hooks array is not an array!\n");
- wfProfileOut( $fname );
return false;
}
if (!array_key_exists($event, $wgHooks)) {
- wfProfileOut( $fname );
return true;
}
if (!is_array($wgHooks[$event])) {
wfDebugDieBacktrace("Hooks array for event '$event' is not an array!\n");
- wfProfileOut( $fname );
return false;
}
$have_data = true;
}
} else {
+ var_dump( $wgHooks );
wfDebugDieBacktrace("Unknown datatype in hooks for " . $event . "\n");
}
} else if (is_string($hook)) { # functions look like strings, too
if (is_string($retval)) {
global $wgOut;
$wgOut->fatalError($retval);
- wfProfileOut( $fname );
return false;
} else if (!$retval) {
- wfProfileOut( $fname );
return false;
}
}
- wfProfileOut( $fname );
return true;
}
?>