From 8bcdc5658e54a6c98ff5436686c88c8cf7e15adc Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sun, 3 Dec 2006 04:05:12 +0000 Subject: [PATCH] (bug 7671) Observe canonical media namespace prefix in Linker::formatComment --- RELEASE-NOTES | 1 + includes/Linker.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4aa999aa95..1b3dde8aec 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Linker.php b/includes/Linker.php index 2a02312151..b54c4264a7 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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] ) { -- 2.20.1