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:15:25 -0700 |
commit | 0ebc36b4e5ef5578791c00b8a64021d3aad96068 (patch) | |
tree | 529b45ac9e30c34e3e1fd2eae46d039340ef3eab | |
parent | cbcb7432b3ddd5bc08f0d127b2f138a5df2b378b (diff) |
Actually execute the database query that updates the album view count. Fixes ticket #1092. Thanks to shinta for pointing the way.
-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; } |