From: Raimond Spekking Date: Wed, 2 Jun 2010 19:30:55 +0000 (+0000) Subject: Bug 23733 - Add IDs to messages used on CSS/JS pages X-Git-Tag: 1.31.0-rc.0~36636 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=22bb56050978245b9d1819d779dd94cd1ad59bb0;p=lhc%2Fweb%2Fwiklou.git Bug 23733 - Add IDs to messages used on CSS/JS pages --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 98520cdaeb..379278e6f0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -76,7 +76,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 23580) Add two new events to LivePreview so that scripts can be notified about the beginning and finishing of LivePreview actions. * (bug 21278) Now the sidebar allows inclusion of wiki markup. - +* (bug 23733) Add IDs to messages used on CSS/JS pages + === Bug fixes in 1.17 === * (bug 17560) Half-broken deletion moved image files to deletion archive without updating database. diff --git a/includes/Article.php b/includes/Article.php index 56d87c2d8e..39cfc152c2 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1084,7 +1084,7 @@ class Article { public function showCssOrJsPage() { global $wgOut; - $wgOut->addHTML( wfMsgExt( 'clearyourcache', 'parse' ) ); + $wgOut->wrapWikiMsg( "
\n$1\n
", 'clearyourcache' ); // Give hooks a chance to customise the output if ( wfRunHooks( 'ShowRawCssJs', array( $this->mContent, $this->mTitle, $wgOut ) ) ) { diff --git a/includes/EditPage.php b/includes/EditPage.php index c909f49bb2..a158193b20 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1411,13 +1411,13 @@ HTML if ( $this->isCssJsSubpage ) { # Check the skin exists if ( !$this->isValidCssJsSubpage ) { - $wgOut->addWikiMsg( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() ); + $wgOut->wrapWikiMsg( "
\n$1\n
", array( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() ) ); } if ( $this->formtype !== 'preview' ) { if ( $this->isCssSubpage ) - $wgOut->addWikiMsg( 'usercssyoucanpreview' ); + $wgOut->wrapWikiMsg( "
\n$1\n
", array( 'usercssyoucanpreview' ) ); if ( $this->isJsSubpage ) - $wgOut->addWikiMsg( 'userjsyoucanpreview' ); + $wgOut->wrapWikiMsg( "
\n$1\n
", array( 'userjsyoucanpreview' ) ); } } } @@ -1866,9 +1866,9 @@ INPUTS if ( $this->isCssJsSubpage ) { if (preg_match( "/\\.css$/", $this->mTitle->getText() ) ) { - $previewtext = wfMsg( 'usercsspreview' ); + $previewtext = "
\n" . wfMsg( 'usercsspreview' ) . "\n
"; } else if (preg_match( "/\\.js$/", $this->mTitle->getText() ) ) { - $previewtext = wfMsg( 'userjspreview' ); + $previewtext = "
\n" . wfMsg( 'userjspreview' ) . "\n
"; } $parserOptions->setTidy( true ); $parserOutput = $wgParser->parse( $previewtext, $this->mTitle, $parserOptions );