diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-06-01 09:15:56 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-06-01 09:15:56 +0200 |
commit | c1039977f1d64611d2c793f3aded96d031b74183 (patch) | |
tree | fa32a8f59c863564998cd149a902388dd363d605 /include/plugin.php | |
parent | 316fee93f7f7df92db514de961b74a71556fdb63 (diff) | |
parent | b1259876bf398880e7b0c1b44d90f94983243e72 (diff) | |
download | volse-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-x | include/plugin.php | 18 |
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) + ); + } } } } |