diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-08-09 00:29:28 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-08-09 00:29:28 -0700 |
commit | b6a50140474b4ac20eb3bf6e1c9427674f728b54 (patch) | |
tree | 0184ea98e371c1754be6862050ef8ab9835f53f8 /modules/comment | |
parent | 541a084cc1dcc6afa19ff526f1a12d0e878be5ab (diff) |
Fix a pagination bug. Fixes ticket #1280.
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/controllers/admin_manage_comments.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/comment/controllers/admin_manage_comments.php b/modules/comment/controllers/admin_manage_comments.php index 0ba3d6b0..0889dc4e 100644 --- a/modules/comment/controllers/admin_manage_comments.php +++ b/modules/comment/controllers/admin_manage_comments.php @@ -51,8 +51,10 @@ class Admin_Manage_Comments_Controller extends Admin_Controller { $view->content->state = $state; $view->content->comments = ORM::factory("comment") ->order_by("created", "DESC") + ->order_by("id", "DESC") ->where("state", "=", $state) - ->limit(self::$items_per_page, ($page - 1) * self::$items_per_page) + ->limit(self::$items_per_page) + ->offset(($page - 1) * self::$items_per_page) ->find_all(); $view->content->pager = new Pagination(); $view->content->pager->initialize( |