r75453 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75452‎ | r75453 | r75454 >
Date:18:53, 26 October 2010
Author:aaron
Status:ok
Tags:
Comment:
* Added plainlinks class (to hide arrow)
* Pass the right object to RevDel_RevisionList
* Added comment about using RevDel_RevisionList
* Reworded "this will revert back to" message. Use when applicable.
* Removed <br/>
Modified paths:
  • /trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php
@@ -1006,14 +1006,11 @@
10071007 * or a string message key
10081008 */
10091009 private function rejectConfirmationForm( Revision $oldRev, $newRev ) {
1010 - global $wgOut;
1011 -
 1010+ global $wgOut, $wgLang;
10121011 $thisPage = SpecialPage::getTitleFor( 'RevisionReview' );
10131012
1014 - $permaLink = $oldRev->getTitle()->getFullURL( 'oldid=' . $oldRev->getId() );
1015 - $wgOut->addWikiMsg( 'revreview-reject-text', $permaLink );
 1013+ $wgOut->addHtml( '<div class="plainlinks">' );
10161014
1017 - $thisPage->skin = $this->user->getSkin();
10181015 $dbr = wfGetDB( DB_SLAVE );
10191016 $oldid = $dbr->addQuotes( $oldRev->getId() );
10201017 $res = $dbr->select( 'revision', 'rev_id',
@@ -1026,8 +1023,13 @@
10271024 $ids[] = $r->rev_id;
10281025 }
10291026
1030 - $list = new RevDel_RevisionList( $thisPage, $oldRev->getTitle(), $ids );
 1027+ // List of revisions being undone...
 1028+ $wgOut->addWikiMsg( 'revreview-reject-text-list' );
10311029 $wgOut->addHtml( '<ul>' );
 1030+ // FIXME: we need a generic revision list class
 1031+ $spRevDelete = SpecialPage::getPage( 'RevisionReview' );
 1032+ $spRevDelete->skin = $this->user->getSkin(); // XXX
 1033+ $list = new RevDel_RevisionList( $spRevDelete, $oldRev->getTitle(), $ids );
10321034 for ( $list->reset(); $list->current(); $list->next() ) {
10331035 $item = $list->current();
10341036 if ( $item->canView() ) {
@@ -1035,6 +1037,17 @@
10361038 }
10371039 }
10381040 $wgOut->addHtml( '</ul>' );
 1041+ // Revision this will revert to (when reverting the top X revs)...
 1042+ if ( $newRev->isCurrent() ) {
 1043+ $permaLink = $oldRev->getTitle()->getFullURL( 'oldid=' . $oldRev->getId() );
 1044+ $wgOut->addWikiMsg( 'revreview-reject-text-revto',
 1045+ $permaLink, $wgLang->timeanddate( $oldRev->getTimestamp(), true ) );
 1046+ }
 1047+ $wgOut->addHtml( '</div>' );
 1048+
 1049+ $defaultSummary = wfMsg( 'revreview-reject-default-summary',
 1050+ $newRev->getUserText(), $oldRev->getId(), $oldRev->getUserText() );
 1051+
10391052 $form = Html::openElement( 'form',
10401053 array( 'method' => 'POST', 'action' => $thisPage->getFullUrl() )
10411054 );
@@ -1045,10 +1058,6 @@
10461059 $form .= Html::hidden( 'refid', $this->refid );
10471060 $form .= Html::hidden( 'target', $oldRev->getTitle()->getPrefixedDBKey() );
10481061 $form .= Html::hidden( 'wpEditToken', $this->user->editToken() );
1049 - $form .= "<br />";
1050 -
1051 - $defaultSummary = wfMsg( 'revreview-reject-default-summary',
1052 - $newRev->getUserText(), $oldRev->getId(), $oldRev->getUserText() );
10531062 $form .= Xml::inputLabel( wfMsg( 'revreview-reject-summary' ), 'wpReason',
10541063 'wpReason', 120, $defaultSummary ) . "<br />";
10551064 $form .= Html::input( 'wpSubmit', wfMsg( 'revreview-reject-confirm' ), 'submit' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r75454Follow-up r75453: missing commitaaron18:54, 26 October 2010

Status & tagging log