r76152 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76151‎ | r76152 | r76153 >
Date:22:24, 5 November 2010
Author:reedy
Status:ok
Tags:
Comment:
Followup r75999, use the correct variable. Zak confused me with having one thing in the bug title, and another in the bug content! :P
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryInfo.php
@@ -48,12 +48,12 @@
4949 }
5050
5151 public function requestExtraData( $pageSet ) {
52 - global $wgDisablePageCounters;
 52+ global $wgDisableCounters;
5353
5454 $pageSet->requestField( 'page_restrictions' );
5555 $pageSet->requestField( 'page_is_redirect' );
5656 $pageSet->requestField( 'page_is_new' );
57 - if ( !$wgDisablePageCounters ) {
 57+ if ( !$wgDisableCounters ) {
5858 $pageSet->requestField( 'page_counter' );
5959 }
6060 $pageSet->requestField( 'page_touched' );
@@ -250,9 +250,9 @@
251251 $this->pageIsRedir = $pageSet->getCustomField( 'page_is_redirect' );
252252 $this->pageIsNew = $pageSet->getCustomField( 'page_is_new' );
253253
254 - global $wgDisablePageCounters;
 254+ global $wgDisableCounters;
255255
256 - if ( !$wgDisablePageCounters ) {
 256+ if ( !$wgDisableCounters ) {
257257 $this->pageCounter = $pageSet->getCustomField( 'page_counter' );
258258 }
259259 $this->pageTouched = $pageSet->getCustomField( 'page_touched' );
@@ -301,11 +301,11 @@
302302 private function extractPageInfo( $pageid, $title ) {
303303 $pageInfo = array();
304304 if ( $title->exists() ) {
305 - global $wgDisablePageCounters;
 305+ global $wgDisableCounters;
306306
307307 $pageInfo['touched'] = wfTimestamp( TS_ISO_8601, $this->pageTouched[$pageid] );
308308 $pageInfo['lastrevid'] = intval( $this->pageLatest[$pageid] );
309 - $pageInfo['counter'] = $wgDisablePageCounters
 309+ $pageInfo['counter'] = $wgDisableCounters
310310 ? ""
311311 : intval( $this->pageCounter[$pageid] );
312312 $pageInfo['length'] = intval( $this->pageLength[$pageid] );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75999* (bug 25760) counter property still reported by the API when wgDisableCounte...reedy13:10, 4 November 2010

Status & tagging log