aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Dent (DM42.Net) <dentm42@gmail.com>2018-09-19 22:33:25 -0400
committerM.Dent (DM42.Net) <dentm42@gmail.com>2018-09-19 22:33:25 -0400
commit3ee632514c44317ede9280a6975a698c61775aa1 (patch)
tree5df029d91c6dd234754c27e5f20baf13a070645c
parent456fe71ca9b768980f578494ee39c46cba946bc8 (diff)
downloadvolse-hubzilla-3ee632514c44317ede9280a6975a698c61775aa1.tar.gz
volse-hubzilla-3ee632514c44317ede9280a6975a698c61775aa1.tar.bz2
volse-hubzilla-3ee632514c44317ede9280a6975a698c61775aa1.zip
Add structure to permit_hook
-rwxr-xr-xinclude/plugin.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 2239f017d..fdc62b3a7 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -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])