Fix bug #972025 : stop considering article name starting by "Media"
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 14 Jun 2004 08:37:40 +0000 (08:37 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 14 Jun 2004 08:37:40 +0000 (08:37 +0000)
as medias, instead consider only those starting by "Media:".

includes/Skin.php

index bc46059..5fb9a13 100644 (file)
@@ -2491,11 +2491,12 @@ class Skin {
                # is ignored
                while(preg_match('/\[\[(.*?)(\|(.*?))*\]\]/',$comment,$match)) {
 
-                       $medians = $wgLang->getNsText(Namespace::getMedia());
+                       $medians = $wgLang->getNsText(Namespace::getMedia()).':';
                        $func='makeLink';
                        if(preg_match('/^'.$medians.'/i',$match[1])) {
                                $func='makeMediaLink';
                        }
+                       # Handle link renaming [[foo|text]] will show link as "text"
                        if(isset($match[3]) ) {
                                $comment=
                                preg_replace('/\[\[(.*?)\]\]/',