* (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.
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 ) ) ) {
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' ) );
}
}
}
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 );