aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-11-20 21:52:40 +0000
committerMario <mario@mariovavti.com>2023-11-20 21:52:40 +0000
commitcfdbf02e6b4901850287d096b97fb38dbf5779d9 (patch)
treef1b7e1f123413f1bfb78e0606ed18c7f8def9f9b /include/plugin.php
parent74911e9f6d44643facd6fa1b45c2035b780570e4 (diff)
downloadvolse-hubzilla-cfdbf02e6b4901850287d096b97fb38dbf5779d9.tar.gz
volse-hubzilla-cfdbf02e6b4901850287d096b97fb38dbf5779d9.tar.bz2
volse-hubzilla-cfdbf02e6b4901850287d096b97fb38dbf5779d9.zip
the additional parameter has been deprecated there is no need to check the version anymore
Diffstat (limited to 'include/plugin.php')
-rw-r--r--include/plugin.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 1a253d38f..eb761dc37 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -482,9 +482,13 @@ function call_hooks($name, &$data = null) {
}
$data = $checkhook['data'];
}
+
$origfn = $hook[1];
- if($hook[0])
+
+ if($hook[0]) {
@include_once($hook[0]);
+ }
+
if(preg_match('|^a:[0-9]+:{.*}$|s', $hook[1])) {
$hook[1] = unserialize($hook[1]);
}
@@ -496,13 +500,12 @@ function call_hooks($name, &$data = null) {
$hook[1] = explode('::',$hook[1]);
}
+
if(is_callable($hook[1])) {
$func = $hook[1];
- if($hook[3])
- $func($data);
+ $func($data);
}
else {
-
// Don't do any DB write calls if we're currently logging a possibly failed DB call.
if(! DBA::$logging) {
// The hook should be removed so we don't process it.