From 77b42e01ff0c4a59bb198170f9bf3acdfb580f3c Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 5 Jul 2011 00:09:09 +0000 Subject: [PATCH] Followup r89617, r91428 call $pager->doQuery explicitally so we get a set result object, from which, we can then get a row count Expliticly marking doQuery() in pager as public --- includes/Pager.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/Pager.php b/includes/Pager.php index 0e04eacdd4..34d9af6d82 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -142,7 +142,7 @@ abstract class IndexPager implements Pager { * has been kept minimal to make it overridable if necessary, to allow for * result sets formed from multiple DB queries. */ - function doQuery() { + public function doQuery() { # Use the child class name for profiling $fname = __METHOD__ . ' (' . get_class( $this ) . ')'; wfProfileIn( $fname ); @@ -199,7 +199,7 @@ abstract class IndexPager implements Pager { # Remove any table prefix from index field $parts = explode( '.', $this->mIndexField ); $indexColumn = end( $parts ); - + $row = $res->fetchRow(); $firstIndex = $row[$indexColumn]; @@ -707,7 +707,9 @@ abstract class ReverseChronologicalPager extends IndexPager { function getNavigationBar() { global $wgLang; - if ( !$this->isNavigationBarShown() ) return ''; + if ( !$this->isNavigationBarShown() ) { + return ''; + } if ( isset( $this->mNavigationBar ) ) { return $this->mNavigationBar; @@ -1002,7 +1004,7 @@ abstract class TablePager extends IndexPager { */ function getLimitSelect() { global $wgLang; - + # Add the current limit from the query string # to avoid that the limit is lost after clicking Go next time if ( !in_array( $this->mLimit, $this->mLimitsShown ) ) { -- 2.20.1