* (bug 18331) MediaWiki:Undelete-revision can now have wikitext
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 4 Apr 2009 20:05:06 +0000 (20:05 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 4 Apr 2009 20:05:06 +0000 (20:05 +0000)
* Wrapped MediaWiki:Undelete-revision arround a <div class="mw-warning"> when previewing and removed the <hr /> after it

Based on a patch by Happy-melon: http://bug-attachment.wikimedia.org/attachment.cgi?id=5988

RELEASE-NOTES
includes/specials/SpecialUndelete.php

index 941167c..3c1aca0 100644 (file)
@@ -323,6 +323,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   skins
 * Fixed a PHP notice when $wgEnableSerializedMessages was set to false
 * (bug 18316) Removed superfluous name="fulltext" from Special:Search
+* (bug 18331) MediaWiki:Undelete-revision can now have wikitext
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index c47f43a..a9fa3b7 100644 (file)
@@ -642,7 +642,7 @@ class UndeleteForm {
                                        $this->showList( $result );
                                }
                        } else {
-                               $wgOut->addWikiText( wfMsgHtml( 'undelete-header' ) );
+                               $wgOut->addWikiMsg( 'undelete-header' );
                        }
                        return;
                }
@@ -763,7 +763,7 @@ class UndeleteForm {
                                        $wgOut->addHTML( '<hr />' );
                                }
                        } else {
-                               $wgOut->addHTML( wfMsgHtml( 'undelete-nodiff' ) );
+                               $wgOut->addWikiMsg( 'undelete-nodiff' );
                        }
                }
 
@@ -774,13 +774,16 @@ class UndeleteForm {
                $t = htmlspecialchars( $wgLang->time( $timestamp, true ) );
                $user = $skin->revUserTools( $rev );
 
-               $wgOut->addHTML( '<p>' . wfMsgHtml( 'undelete-revision', $link, $time, $user, $d, $t ) . '</p>' );
+               if( $this->mPreview ) {
+                       $openDiv = '<div id="mw-undelete-revision" class="mw-warning">';
+               } else {
+                       $openDiv = '<div id="mw-undelete-revision">';
+               }
 
+               $wgOut->addHTML( $openDiv . wfMsgWikiHtml( 'undelete-revision', $link, $time, $user, $d, $t ) . '</div>' );
                wfRunHooks( 'UndeleteShowRevision', array( $this->mTargetObj, $rev ) );
 
                if( $this->mPreview ) {
-                       $wgOut->addHTML( "<hr />\n" );
-
                        //Hide [edit]s
                        $popts = $wgOut->parserOptions();
                        $popts->setEditSection( false );
@@ -941,7 +944,7 @@ class UndeleteForm {
                        $wgOut->setPagetitle( wfMsg( 'viewdeletedpage' ) );
                }
 
-               $wgOut->addWikiText( wfMsgHtml( 'undeletepagetitle', $this->mTargetObj->getPrefixedText()) );
+               $wgOut->addWikiMsg( 'undeletepagetitle', $this->mTargetObj->getPrefixedText() );
 
                $archive = new PageArchive( $this->mTargetObj );
                /*