aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-10-29 23:10:31 +0000
committerrvelices <rv-github@modusoptimus.com>2007-10-29 23:10:31 +0000
commit56a533f3cb1c7f0e3be321dae32fc551d7cf9e72 (patch)
tree3287407fe21a611b0d6f6810346cb34a0c868126 /picture.php
parenteab34bed9c919e1d57736705d2e9a037b41a4a55 (diff)
- send status code 403 when attempt to enter a comment, but comments are disabled
- added trigger wether we should increment hit count git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2154 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r--picture.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/picture.php b/picture.php
index ca9c01e9f..bbb806cd9 100644
--- a/picture.php
+++ b/picture.php
@@ -244,13 +244,16 @@ DELETE FROM '.COMMENTS_TABLE.'
}
// incrementation of the number of hits, we do this only if no action
-$query = '
+if (trigger_event('allow_increment_element_hit_count', !isset($_POST['content']) ) )
+{
+ $query = '
UPDATE
'.IMAGES_TABLE.'
SET hit = hit+1
WHERE id = '.$page['image_id'].'
;';
-pwg_query($query);
+ pwg_query($query);
+}
//---------------------------------------------------------- related categories
$query = '