aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-03-08 01:55:49 +0000
committerrvelices <rv-github@modusoptimus.com>2007-03-08 01:55:49 +0000
commiteab3d5e20e3c823b32aa320f6816f3edb6993d95 (patch)
treee9760449aa651c9381f337e69f7644ea39cf6369 /include/functions.inc.php
parent246106e83ff6a639e8c04cfd52ec6e5e19697d85 (diff)
- plugin administration: small fix during activation phase
- plugins: added 3 actions in category_cats.inc.php and 1 event that allow a plugin to decide if insertion to #history occurs - added a warning in section_init if script_basename() is not index or picture (I think we'll have issues on some servers with this function) - web service methods categories.getImages, tags.getImages and images.search return now the image comment git-svn-id: http://piwigo.org/svn/trunk@1880 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php14
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;
}