r48060 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48059‎ | r48060 | r48061 >
Date:13:52, 5 March 2009
Author:demon
Status:ok
Tags:
Comment:
(bug 17795) Make meta=siteinfo respect $wgDisableCounters.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -282,10 +282,13 @@
283283 }
284284
285285 protected function appendStatistics( $property ) {
 286+ global $wgDisableCounters;
286287 $data = array();
287288 $data['pages'] = intval( SiteStats::pages() );
288289 $data['articles'] = intval( SiteStats::articles() );
289 - $data['views'] = intval( SiteStats::views() );
 290+ if ( !$wgDisableCounters ) {
 291+ $data['views'] = intval( SiteStats::views() );
 292+ }
290293 $data['edits'] = intval( SiteStats::edits() );
291294 $data['images'] = intval( SiteStats::images() );
292295 $data['users'] = intval( SiteStats::users() );
Index: trunk/phase3/RELEASE-NOTES
@@ -280,6 +280,8 @@
281281 * (bug 13209) Added rvdiffto parameter to prop=revisions
282282 * Manual language conversion improve: Now we can include both ";" and ":" in
283283 conversion rules
 284+* (bug 17795) Don't report views count on meta=siteinfo if $wgDisableCounters
 285+ is set
284286
285287 === Languages updated in 1.15 ===
286288

Status & tagging log