From: Sam Reed Date: Tue, 5 Jul 2011 00:09:09 +0000 (+0000) Subject: Followup r89617, r91428 call $pager->doQuery explicitally so we get a set result... X-Git-Tag: 1.31.0-rc.0~29073 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=77b42e01ff0c4a59bb198170f9bf3acdfb580f3c;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) ) {