aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorMichael Vogel <icarus@dabo.de>2012-05-16 08:24:46 +0200
committerMichael Vogel <icarus@dabo.de>2012-05-16 08:24:46 +0200
commitf2c0c40f6e488f1a8e62bda9449b28115f343cac (patch)
treeae1418141f85be49b7d8cb3d2a0e8b2a7acc4eb4 /include/plugin.php
parentf2e648d62fe7cafb9a55c7505687ea4d1c294778 (diff)
parenta65bd73bf3f4a1e6ccfcdf0a06c70a4f1f4182ce (diff)
downloadvolse-hubzilla-f2c0c40f6e488f1a8e62bda9449b28115f343cac.tar.gz
volse-hubzilla-f2c0c40f6e488f1a8e62bda9449b28115f343cac.tar.bz2
volse-hubzilla-f2c0c40f6e488f1a8e62bda9449b28115f343cac.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/plugin.php')
-rw-r--r--include/plugin.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 4ff78a8b4..ae8eee78a 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -70,8 +70,10 @@ function reload_plugins() {
$installed = array();
$parr = explode(',',$plugins);
+
if(count($parr)) {
foreach($parr as $pl) {
+
$pl = trim($pl);
$fname = 'addon/' . $pl . '/' . $pl . '.php';
@@ -101,6 +103,7 @@ function reload_plugins() {
}
}
}
+
}}
@@ -163,6 +166,14 @@ function call_hooks($name, &$data = null) {
$func = $hook[HOOK_FUNCTION];
$func($a,$data);
}
+ else {
+ // remove orphan hooks
+ q("delete from hook where hook = '%s' and file = '$s' and function = '%s' limit 1",
+ dbesc($hook[HOOK_HOOK]),
+ dbesc($hook[HOOK_FILE]),
+ dbesc($hook[HOOK_FUNCTION])
+ );
+ }
}
}
}