aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
Diffstat (limited to 'picture.php')
-rw-r--r--picture.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/picture.php b/picture.php
index cc43eab95..50e06bc33 100644
--- a/picture.php
+++ b/picture.php
@@ -241,14 +241,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', true) )
+{
+ $query = '
UPDATE
'.IMAGES_TABLE.'
SET hit = hit+1
WHERE id = '.$page['image_id'].'
;';
-pwg_query($query);
-
+ pwg_query($query);
+}
//---------------------------------------------------------- related categories
$query = '
SELECT category_id,uppercats,commentable,global_rank