aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-01 09:15:56 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-01 09:15:56 +0200
commitc1039977f1d64611d2c793f3aded96d031b74183 (patch)
treefa32a8f59c863564998cd149a902388dd363d605 /include/plugin.php
parent316fee93f7f7df92db514de961b74a71556fdb63 (diff)
parentb1259876bf398880e7b0c1b44d90f94983243e72 (diff)
downloadvolse-hubzilla-c1039977f1d64611d2c793f3aded96d031b74183.tar.gz
volse-hubzilla-c1039977f1d64611d2c793f3aded96d031b74183.tar.bz2
volse-hubzilla-c1039977f1d64611d2c793f3aded96d031b74183.zip
Merge branch 'dev' into sabre32
Diffstat (limited to 'include/plugin.php')
-rwxr-xr-xinclude/plugin.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 5dbfc218a..be4e92f03 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -300,12 +300,18 @@ function call_hooks($name, &$data = null) {
$func($data);
else
$func($a, $data);
- } else {
- q("DELETE FROM hook WHERE hook = '%s' AND file = '%s' AND fn = '%s'",
- dbesc($name),
- dbesc($hook[0]),
- dbesc($origfn)
- );
+ }
+ 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.
+ q("DELETE FROM hook WHERE hook = '%s' AND file = '%s' AND fn = '%s'",
+ dbesc($name),
+ dbesc($hook[0]),
+ dbesc($origfn)
+ );
+ }
}
}
}