r49184 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49183‎ | r49184 | r49185 >
Date:20:05, 4 April 2009
Author:ialex
Status:ok
Tags:
Comment:
* (bug 18331) MediaWiki:Undelete-revision can now have wikitext
* 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
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -642,7 +642,7 @@
643643 $this->showList( $result );
644644 }
645645 } else {
646 - $wgOut->addWikiText( wfMsgHtml( 'undelete-header' ) );
 646+ $wgOut->addWikiMsg( 'undelete-header' );
647647 }
648648 return;
649649 }
@@ -763,7 +763,7 @@
764764 $wgOut->addHTML( '<hr />' );
765765 }
766766 } else {
767 - $wgOut->addHTML( wfMsgHtml( 'undelete-nodiff' ) );
 767+ $wgOut->addWikiMsg( 'undelete-nodiff' );
768768 }
769769 }
770770
@@ -774,13 +774,16 @@
775775 $t = htmlspecialchars( $wgLang->time( $timestamp, true ) );
776776 $user = $skin->revUserTools( $rev );
777777
778 - $wgOut->addHTML( '<p>' . wfMsgHtml( 'undelete-revision', $link, $time, $user, $d, $t ) . '</p>' );
 778+ if( $this->mPreview ) {
 779+ $openDiv = '<div id="mw-undelete-revision" class="mw-warning">';
 780+ } else {
 781+ $openDiv = '<div id="mw-undelete-revision">';
 782+ }
779783
 784+ $wgOut->addHTML( $openDiv . wfMsgWikiHtml( 'undelete-revision', $link, $time, $user, $d, $t ) . '</div>' );
780785 wfRunHooks( 'UndeleteShowRevision', array( $this->mTargetObj, $rev ) );
781786
782787 if( $this->mPreview ) {
783 - $wgOut->addHTML( "<hr />\n" );
784 -
785788 //Hide [edit]s
786789 $popts = $wgOut->parserOptions();
787790 $popts->setEditSection( false );
@@ -941,7 +944,7 @@
942945 $wgOut->setPagetitle( wfMsg( 'viewdeletedpage' ) );
943946 }
944947
945 - $wgOut->addWikiText( wfMsgHtml( 'undeletepagetitle', $this->mTargetObj->getPrefixedText()) );
 948+ $wgOut->addWikiMsg( 'undeletepagetitle', $this->mTargetObj->getPrefixedText() );
946949
947950 $archive = new PageArchive( $this->mTargetObj );
948951 /*
Index: trunk/phase3/RELEASE-NOTES
@@ -323,6 +323,7 @@
324324 skins
325325 * Fixed a PHP notice when $wgEnableSerializedMessages was set to false
326326 * (bug 18316) Removed superfluous name="fulltext" from Special:Search
 327+* (bug 18331) MediaWiki:Undelete-revision can now have wikitext
327328
328329 == API changes in 1.15 ==
329330 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Status & tagging log