From 897056816eae1fc16abd1e4724e553b3df1a7384 Mon Sep 17 00:00:00 2001 From: rWatcher Date: Fri, 26 Feb 2010 14:19:53 -0500 Subject: [PATCH] Page numbering bugfix. --- modules/latestupdates/controllers/latestupdates.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/latestupdates/controllers/latestupdates.php b/modules/latestupdates/controllers/latestupdates.php index 4b5560b0..02200d20 100644 --- a/modules/latestupdates/controllers/latestupdates.php +++ b/modules/latestupdates/controllers/latestupdates.php @@ -39,7 +39,9 @@ class latestupdates_Controller extends Controller { // for page numbering purposes. $count = $item ->viewable() - ->descendants_count(null, null, array(array("type", "!=", "album"))); + ->where("type", "!=", "album") + ->order_by("created", "DESC") + ->descendants_count(); // Figure out what the highest page number is. $max_pages = ceil($count / $page_size);