Add structure to permit_hook

This commit is contained in:
M.Dent (DM42.Net) 2018-09-19 22:33:25 -04:00
parent 456fe71ca9
commit 3ee632514c

View File

@ -463,12 +463,19 @@ function call_hooks($name, &$data = null) {
$checkhook = [
'name'=>$name,
'hook'=>$hook,
'data'=>$data,
// Note: Since PHP uses COPY-ON-WRITE
// for variables, there is no cost to
// passing the $data structure (unless
// the permit_hook processors change the
// information it contains.
'permit'=>true
];
call_hooks('permit_hook',$checkhook);
if (!$checkhook['permit']) {
continue;
}
$data = $checkhook['data'];
}
$origfn = $hook[1];
if($hook[0])