diff options
author | zottel <github@zottel.net> | 2012-05-14 13:59:37 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2012-05-14 13:59:37 +0200 |
commit | 584b15aaecbf6f58cda2031908f0319c6dfc0700 (patch) | |
tree | 0b56a9e4de6c38a052878f2a5c18a05dae15c57c /include/plugin.php | |
parent | c43a03e21bcd12b24be8a59741ec6591c1f651d7 (diff) | |
parent | 59aefd9346fbd0d5c3cd9cdbf2158719221412f9 (diff) | |
download | volse-hubzilla-584b15aaecbf6f58cda2031908f0319c6dfc0700.tar.gz volse-hubzilla-584b15aaecbf6f58cda2031908f0319c6dfc0700.tar.bz2 volse-hubzilla-584b15aaecbf6f58cda2031908f0319c6dfc0700.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/plugin.php')
-rw-r--r-- | include/plugin.php | 11 |
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]) + ); + } } } } |