Index: trunk/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -48,10 +48,14 @@ |
49 | 49 | } |
50 | 50 | |
51 | 51 | public function requestExtraData( $pageSet ) { |
| 52 | + global $wgDisablePageCounters; |
| 53 | + |
52 | 54 | $pageSet->requestField( 'page_restrictions' ); |
53 | 55 | $pageSet->requestField( 'page_is_redirect' ); |
54 | 56 | $pageSet->requestField( 'page_is_new' ); |
55 | | - $pageSet->requestField( 'page_counter' ); |
| 57 | + if ( $wgDisablePageCounters ) { |
| 58 | + $pageSet->requestField( 'page_counter' ); |
| 59 | + } |
56 | 60 | $pageSet->requestField( 'page_touched' ); |
57 | 61 | $pageSet->requestField( 'page_latest' ); |
58 | 62 | $pageSet->requestField( 'page_len' ); |
— | — | @@ -245,7 +249,12 @@ |
246 | 250 | $this->pageRestrictions = $pageSet->getCustomField( 'page_restrictions' ); |
247 | 251 | $this->pageIsRedir = $pageSet->getCustomField( 'page_is_redirect' ); |
248 | 252 | $this->pageIsNew = $pageSet->getCustomField( 'page_is_new' ); |
249 | | - $this->pageCounter = $pageSet->getCustomField( 'page_counter' ); |
| 253 | + |
| 254 | + global $wgDisablePageCounters; |
| 255 | + |
| 256 | + if ( !$wgDisablePageCounters ) { |
| 257 | + $this->pageCounter = $pageSet->getCustomField( 'page_counter' ); |
| 258 | + } |
250 | 259 | $this->pageTouched = $pageSet->getCustomField( 'page_touched' ); |
251 | 260 | $this->pageLatest = $pageSet->getCustomField( 'page_latest' ); |
252 | 261 | $this->pageLength = $pageSet->getCustomField( 'page_len' ); |
— | — | @@ -292,9 +301,13 @@ |
293 | 302 | private function extractPageInfo( $pageid, $title ) { |
294 | 303 | $pageInfo = array(); |
295 | 304 | if ( $title->exists() ) { |
| 305 | + global $wgDisablePageCounters; |
| 306 | + |
296 | 307 | $pageInfo['touched'] = wfTimestamp( TS_ISO_8601, $this->pageTouched[$pageid] ); |
297 | 308 | $pageInfo['lastrevid'] = intval( $this->pageLatest[$pageid] ); |
298 | | - $pageInfo['counter'] = intval( $this->pageCounter[$pageid] ); |
| 309 | + $pageInfo['counter'] = $wgDisablePageCounters |
| 310 | + ? "" |
| 311 | + : intval( $this->pageCounter[$pageid] ); |
299 | 312 | $pageInfo['length'] = intval( $this->pageLength[$pageid] ); |
300 | 313 | |
301 | 314 | if ( $this->pageIsRedir[$pageid] ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -487,6 +487,8 @@ |
488 | 488 | * The HTML of diff output markers has changed. Hyphens are now minus signs, |
489 | 489 | empty markers are now filled with non-breaking-space characters |
490 | 490 | * (bug 25741) Add more data to list=search's srprop |
| 491 | +* (bug 25760) counter property still reported by the API when |
| 492 | + $wgDisableCounters enabled |
491 | 493 | |
492 | 494 | === Languages updated in 1.17 === |
493 | 495 | |