r61331 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61330‎ | r61331 | r61332 >
Date:14:25, 21 January 2010
Author:demon
Status:deferred
Tags:
Comment:
Use correct class name MWNamespace
Modified paths:
  • /trunk/extensions/DiscussionThreading/REV1_10_0/includes/Linker.php (modified) (history)
  • /trunk/extensions/DiscussionThreading/REV1_10_1/includes/Linker.php (modified) (history)
  • /trunk/extensions/DiscussionThreading/REV1_9_3/includes/Linker.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DiscussionThreading/REV1_9_3/includes/Linker.php
@@ -910,7 +910,7 @@
911911
912912 # format regular and media links - all other wiki formatting
913913 # is ignored
914 - $medians = '(?:' . preg_quote( Namespace::getCanonicalName( NS_MEDIA ), '/' ) . '|';
 914+ $medians = '(?:' . preg_quote( MWNamespace::getCanonicalName( NS_MEDIA ), '/' ) . '|';
915915 $medians .= preg_quote( $wgContLang->getNsText( NS_MEDIA ), '/' ) . '):';
916916 while(preg_match('/\[\[:?(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
917917 # Handle link renaming [[foo|text]] will show link as "text"
Index: trunk/extensions/DiscussionThreading/REV1_10_0/includes/Linker.php
@@ -861,7 +861,7 @@
862862
863863 # format regular and media links - all other wiki formatting
864864 # is ignored
865 - $medians = '(?:' . preg_quote( Namespace::getCanonicalName( NS_MEDIA ), '/' ) . '|';
 865+ $medians = '(?:' . preg_quote( MWNamespace::getCanonicalName( NS_MEDIA ), '/' ) . '|';
866866 $medians .= preg_quote( $wgContLang->getNsText( NS_MEDIA ), '/' ) . '):';
867867 while(preg_match('/\[\[:?(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
868868 # Handle link renaming [[foo|text]] will show link as "text"
Index: trunk/extensions/DiscussionThreading/REV1_10_1/includes/Linker.php
@@ -861,7 +861,7 @@
862862
863863 # format regular and media links - all other wiki formatting
864864 # is ignored
865 - $medians = '(?:' . preg_quote( Namespace::getCanonicalName( NS_MEDIA ), '/' ) . '|';
 865+ $medians = '(?:' . preg_quote( MWNamespace::getCanonicalName( NS_MEDIA ), '/' ) . '|';
866866 $medians .= preg_quote( $wgContLang->getNsText( NS_MEDIA ), '/' ) . '):';
867867 while(preg_match('/\[\[:?(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
868868 # Handle link renaming [[foo|text]] will show link as "text"
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php
@@ -28,7 +28,7 @@
2929 }
3030
3131 function createPage() {
32 - $expressionNameSpaceId = Namespace::getCanonicalIndex('expression');
 32+ $expressionNameSpaceId = MWNamespace::getCanonicalIndex('expression');
3333 wfDebug( "NS ID: $expressionNameSpaceId \n" );
3434 return createPage( $expressionNameSpaceId, getPageTitle( $this->spelling ) );
3535 }
@@ -187,7 +187,7 @@
188188
189189 function createExpression( $spelling, $languageId ) {
190190 $expression = new Expression( createExpressionId( $spelling, $languageId ), $spelling, $languageId );
191 - $expressionTitle = Title::makeTitle( Namespace::getCanonicalIndex('expression') , $spelling );
 191+ $expressionTitle = Title::makeTitle( MWNamespace::getCanonicalIndex('expression') , $spelling );
192192 if( !$expressionTitle->exists() ) {
193193 $expression->createNewInDatabase();
194194 }

Status & tagging log