From: Antoine Musso Date: Mon, 14 Jun 2004 08:37:40 +0000 (+0000) Subject: Fix bug #972025 : stop considering article name starting by "Media" X-Git-Tag: 1.5.0alpha1~2855 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=6248715474212149251b63ba79cdd50bc5f8f3c2;p=lhc%2Fweb%2Fwiklou.git Fix bug #972025 : stop considering article name starting by "Media" as medias, instead consider only those starting by "Media:". --- diff --git a/includes/Skin.php b/includes/Skin.php index bc460590f5..5fb9a13e74 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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('/\[\[(.*?)\]\]/',