diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-11 08:15:25 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-11 08:17:03 -0700 |
commit | 30f4e143e8fbec928661dcbe75898465e7eff29c (patch) | |
tree | 00cb7eddcba7f7c777d62c188c73bb2d28ed5050 /modules | |
parent | 58b21e909d8ba628ddb8a19e732989821abb0283 (diff) |
Actually execute the database query that updates the album view count. Fixes ticket #1092. Thanks to shinta for pointing the way.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/controllers/albums.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index ea15418f..eaa09be5 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -73,8 +73,8 @@ class Albums_Controller extends Items_Controller { // We can't use math in ORM or the query builder, so do this by hand. It's important // that we do this with math, otherwise concurrent accesses will damage accuracy. - db::query( - "UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = $album->id"); + db::query("UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = $album->id") + ->execute(); print $template; } |