From: Brion Vibber Date: Tue, 9 Jan 2007 00:00:56 +0000 (+0000) Subject: Fix regression in use of messages with underscores/spaces; normalize spaces to unders... X-Git-Tag: 1.31.0-rc.0~54569 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=efdffb2bcaf0b09c4e3d437cae818368b23b0fbc;p=lhc%2Fweb%2Fwiklou.git Fix regression in use of messages with underscores/spaces; normalize spaces to underscores for loading --- diff --git a/includes/MessageCache.php b/includes/MessageCache.php index 0e2b8f9328..75c14d63b3 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -446,6 +446,7 @@ class MessageCache { # Normalise title-case input $lckey = $wgContLang->lcfirst( $key ); + $lckey = str_replace( ' ', '_', $lckey ); # Try the MediaWiki namespace if( !$this->mDisable && $useDB ) { diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 730b038da1..3d748aef3a 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -4777,6 +4777,24 @@ Transclusion of nonexistent MediaWiki message

!! end +!! test +Transclusion of MediaWiki message with underscore +!! input +{{MediaWiki:history_short}} +!! result +

History +

+!! end + +!! test +Transclusion of MediaWiki message with space +!! input +{{MediaWiki:history short}} +!! result +

History +

+!! end + !! test Invalid header with following text !! input