aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-11 03:41:29 -0700
committerfriendica <info@friendica.com>2012-05-11 03:41:29 -0700
commit496782e468fa206845b0baca8e91fb3a7d4278d4 (patch)
tree27f2192d455dc3ea38f8d9a4416a4d2d420a03ac /include
parent8a5dcf64d84b98bda80e0346d508efc072c50002 (diff)
downloadvolse-hubzilla-496782e468fa206845b0baca8e91fb3a7d4278d4.tar.gz
volse-hubzilla-496782e468fa206845b0baca8e91fb3a7d4278d4.tar.bz2
volse-hubzilla-496782e468fa206845b0baca8e91fb3a7d4278d4.zip
moderated comment templates
Diffstat (limited to 'include')
-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])
+ );
+ }
}
}
}