diff options
| author | Joe7 <jozsef.rnagy@site.hu> | 2011-01-03 13:21:54 +0100 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2011-01-03 11:01:02 -0800 |
| commit | 336632fea0a955d74099cd169b3178c01f250ff5 (patch) | |
| tree | ea4f7b41d735dc41bbeb6f073052a8215ecc42a0 /modules/gallery/controllers/photos.php | |
| parent | e760200eeec2f003f95072118a6cc52971c76dad (diff) | |
Keep view counters of all item types accurate
Added common increment_view_count() func in item model for reuse
Diffstat (limited to 'modules/gallery/controllers/photos.php')
| -rw-r--r-- | modules/gallery/controllers/photos.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index b22ac8e5..2dc22ca4 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -49,8 +49,7 @@ class Photos_Controller extends Items_Controller { $template->content = new View("photo.html"); - $photo->view_count++; - $photo->save(); + $photo->increment_view_count(); print $template; } |
