diff options
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r-- | include/functions.inc.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index 5990b1f68..5540c87c8 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -413,18 +413,24 @@ function pwg_log($image_id = null, $image_type = null) { global $conf, $user, $page; + $do_log = true; if (!$conf['log']) { - return false; + $do_log = false; } - if (is_admin() and !$conf['history_admin']) { - return false; + $do_log = false; } - if ($user['is_the_guest'] and !$conf['history_guest']) { + $do_log = false; + } + + $do_log = trigger_event('pwg_log_allowed', $do_log, $image_id, $image_type); + + if (!$do_log) + { return false; } |