r85715 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85714‎ | r85715 | r85716 >
Date:10:50, 9 April 2011
Author:ialex
Status:deferred
Tags:
Comment:
Use MWNamespace::getCanonicalName() instead of $wgCanonicalNamespaceNames
Modified paths:
  • /trunk/extensions/NewsChannel/NewsChannel_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/NewsChannel/NewsChannel_body.php
@@ -69,7 +69,7 @@
7070 * outputChannelMarkup( $newsItems ) function.
7171 */
7272 function showChannel() {
73 - global $wgContLang, $wgCanonicalNamespaceNames, $wgServer, $wgStylePath, $wgRequest, $wgOut;
 73+ global $wgContLang, $wgServer, $wgStylePath, $wgRequest, $wgOut;
7474 global $wgNewsChannelDefaultItems, $wgNewsChannelMaxItems, $wgNewsChannelAuthorizedEditors;
7575 global $wgNewsChannelCategory, $wgNewsChannelExcludeCategory, $wgNewsChannelRemoveArticlePrefix;
7676
@@ -94,7 +94,7 @@
9595
9696 $categoryPrefixesRegex = '/^(' .
9797 preg_quote( $wgContLang->getNsText( NS_CATEGORY ), "/" ) . '|' .
98 - preg_quote( $wgCanonicalNamespaceNames[ NS_CATEGORY ] ) . '):/i';
 98+ preg_quote( MWNamespace::getCanonicalName( NS_CATEGORY ) ) . '):/i';
9999
100100 $inCategoriesStr = $dbr->addQuotes( str_replace( ' ', '_', $wgNewsChannelCategory ) ) . ',';
101101 $inCategoriesCount = 1;

Status & tagging log