r86318 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86317‎ | r86318 | r86319 >
Date:16:33, 18 April 2011
Author:ialex
Status:ok
Tags:
Comment:
Use MWNamespace::getContentNamespaces() instead of $wgContentNamespaces in case of misconfiguration of the latter
Modified paths:
  • /trunk/phase3/includes/SiteStats.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SiteStats.php
@@ -293,12 +293,11 @@
294294 * @return Integer
295295 */
296296 public function articles() {
297 - global $wgContentNamespaces;
298297 $this->mArticles = $this->db->selectField(
299298 'page',
300299 'COUNT(*)',
301300 array(
302 - 'page_namespace' => $wgContentNamespaces,
 301+ 'page_namespace' => MWNamespace::getContentNamespaces(),
303302 'page_is_redirect' => 0,
304303 'page_len > 0'
305304 ),

Status & tagging log