(bug 7671) Observe canonical media namespace prefix in Linker::formatComment
authorRob Church <robchurch@users.mediawiki.org>
Sun, 3 Dec 2006 04:05:12 +0000 (04:05 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sun, 3 Dec 2006 04:05:12 +0000 (04:05 +0000)
RELEASE-NOTES
includes/Linker.php

index 4aa999a..1b3dde8 100644 (file)
@@ -245,6 +245,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Special:Contributions has been rewritten to inherit from QueryPage
 * New special page Special:NewbieContributions, with a (deprecated)
   redirect from Special:Contributions/newbies for backwards compatibility
+* (bug 7671) Observe canonical media namespace prefix in Linker::formatComment
 
 == Languages updated ==
 
index 2a02312..b54c426 100644 (file)
@@ -931,7 +931,8 @@ class Linker {
 
                # format regular and media links - all other wiki formatting
                # is ignored
-               $medians = $wgContLang->getNsText( NS_MEDIA ) . ':';
+               $medians = '(?:' . Namespace::getCanonicalName( NS_MEDIA ) . '|';
+               $medians .= $wgContLang->getNsText( NS_MEDIA ) . '):';
                while(preg_match('/\[\[(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
                        # Handle link renaming [[foo|text]] will show link as "text"
                        if( "" != $match[3] ) {