From: Santhosh Thottingal Date: Mon, 2 Apr 2012 11:35:36 +0000 (+0530) Subject: Make SITENAME with value mw.config.get( 'wgSiteName' ) available in parser without... X-Git-Tag: 1.31.0-rc.0~24005^2 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=91bc48e832bb8daa9d341e4d32f91928808ff737;p=lhc%2Fweb%2Fwiklou.git Make SITENAME with value mw.config.get( 'wgSiteName' ) available in parser without the need of module users explicitly adding it. - Refer Bug 33658 - Merging the jsgrammar branch of svn. Change-Id: Iacdf02122f396ac90678241775eb8e079ff6369a --- diff --git a/resources/mediawiki/mediawiki.jqueryMsg.js b/resources/mediawiki/mediawiki.jqueryMsg.js index a8d4a3add3..3e33bde9a5 100644 --- a/resources/mediawiki/mediawiki.jqueryMsg.js +++ b/resources/mediawiki/mediawiki.jqueryMsg.js @@ -103,7 +103,9 @@ }; var parserDefaults = { - 'magic' : {}, + 'magic' : { + 'SITENAME' : mw.config.get( 'wgSiteName' ) + }, 'messages' : mw.messages, 'language' : mw.language }; @@ -666,9 +668,6 @@ }; - // TODO figure out a way to make magic work with common globals like wgSiteName, without requiring init from library users... - // var options = { magic: { 'SITENAME' : mw.config.get( 'wgSiteName' ) } }; - // deprecated! don't rely on gM existing. // the window.gM ought not to be required - or if required, not required here. But moving it to extensions breaks it (?!) // Need to fix plugin so it could do attributes as well, then will be okay to remove this.