Bug 23733 - Add IDs to messages used on CSS/JS pages
authorRaimond Spekking <raymond@users.mediawiki.org>
Wed, 2 Jun 2010 19:30:55 +0000 (19:30 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Wed, 2 Jun 2010 19:30:55 +0000 (19:30 +0000)
RELEASE-NOTES
includes/Article.php
includes/EditPage.php

index 98520cd..379278e 100644 (file)
@@ -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.
index 56d87c2..39cfc15 100644 (file)
@@ -1084,7 +1084,7 @@ class Article {
        public function showCssOrJsPage() {
                global $wgOut;
 
-               $wgOut->addHTML( wfMsgExt( 'clearyourcache', 'parse' ) );
+               $wgOut->wrapWikiMsg( "<div class='mw-clearyourcache'>\n$1\n</div>", 'clearyourcache' );
 
                // Give hooks a chance to customise the output
                if ( wfRunHooks( 'ShowRawCssJs', array( $this->mContent, $this->mTitle, $wgOut ) ) ) {
index c909f49..a158193 100644 (file)
@@ -1411,13 +1411,13 @@ HTML
                        if ( $this->isCssJsSubpage ) {
                                # Check the skin exists
                                if ( !$this->isValidCssJsSubpage ) {
-                                       $wgOut->addWikiMsg( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() );
+                                       $wgOut->wrapWikiMsg( "<div class='error' id='mw-userinvalidcssjstitle'>\n$1\n</div>", array( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() ) );
                                }
                                if ( $this->formtype !== 'preview' ) {
                                        if ( $this->isCssSubpage )
-                                               $wgOut->addWikiMsg( 'usercssyoucanpreview' );
+                                               $wgOut->wrapWikiMsg( "<div id='mw-usercssyoucanpreview'>\n$1\n</div>", array( 'usercssyoucanpreview' ) );
                                        if ( $this->isJsSubpage )
-                                               $wgOut->addWikiMsg( 'userjsyoucanpreview' );
+                                               $wgOut->wrapWikiMsg( "<div id='mw-userjsyoucanpreview'>\n$1\n</div>", array( 'userjsyoucanpreview' ) );
                                }
                        }
                }
@@ -1866,9 +1866,9 @@ INPUTS
 
                if ( $this->isCssJsSubpage ) {
                        if (preg_match( "/\\.css$/", $this->mTitle->getText() ) ) {
-                               $previewtext = wfMsg( 'usercsspreview' );
+                               $previewtext = "<div id='mw-usercsspreview'>\n" . wfMsg( 'usercsspreview' ) . "\n</div>";
                        } else if (preg_match( "/\\.js$/", $this->mTitle->getText() ) ) {
-                               $previewtext = wfMsg( 'userjspreview' );
+                               $previewtext = "<div id='mw-userjspreview'>\n" . wfMsg( 'userjspreview' ) . "\n</div>";
                        }
                        $parserOptions->setTidy( true );
                        $parserOutput = $wgParser->parse( $previewtext, $this->mTitle, $parserOptions );