Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -1006,14 +1006,11 @@ |
1007 | 1007 | * or a string message key |
1008 | 1008 | */ |
1009 | 1009 | private function rejectConfirmationForm( Revision $oldRev, $newRev ) { |
1010 | | - global $wgOut; |
1011 | | - |
| 1010 | + global $wgOut, $wgLang; |
1012 | 1011 | $thisPage = SpecialPage::getTitleFor( 'RevisionReview' ); |
1013 | 1012 | |
1014 | | - $permaLink = $oldRev->getTitle()->getFullURL( 'oldid=' . $oldRev->getId() ); |
1015 | | - $wgOut->addWikiMsg( 'revreview-reject-text', $permaLink ); |
| 1013 | + $wgOut->addHtml( '<div class="plainlinks">' ); |
1016 | 1014 | |
1017 | | - $thisPage->skin = $this->user->getSkin(); |
1018 | 1015 | $dbr = wfGetDB( DB_SLAVE ); |
1019 | 1016 | $oldid = $dbr->addQuotes( $oldRev->getId() ); |
1020 | 1017 | $res = $dbr->select( 'revision', 'rev_id', |
— | — | @@ -1026,8 +1023,13 @@ |
1027 | 1024 | $ids[] = $r->rev_id; |
1028 | 1025 | } |
1029 | 1026 | |
1030 | | - $list = new RevDel_RevisionList( $thisPage, $oldRev->getTitle(), $ids ); |
| 1027 | + // List of revisions being undone... |
| 1028 | + $wgOut->addWikiMsg( 'revreview-reject-text-list' ); |
1031 | 1029 | $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 ); |
1032 | 1034 | for ( $list->reset(); $list->current(); $list->next() ) { |
1033 | 1035 | $item = $list->current(); |
1034 | 1036 | if ( $item->canView() ) { |
— | — | @@ -1035,6 +1037,17 @@ |
1036 | 1038 | } |
1037 | 1039 | } |
1038 | 1040 | $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 | + |
1039 | 1052 | $form = Html::openElement( 'form', |
1040 | 1053 | array( 'method' => 'POST', 'action' => $thisPage->getFullUrl() ) |
1041 | 1054 | ); |
— | — | @@ -1045,10 +1058,6 @@ |
1046 | 1059 | $form .= Html::hidden( 'refid', $this->refid ); |
1047 | 1060 | $form .= Html::hidden( 'target', $oldRev->getTitle()->getPrefixedDBKey() ); |
1048 | 1061 | $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() ); |
1053 | 1062 | $form .= Xml::inputLabel( wfMsg( 'revreview-reject-summary' ), 'wpReason', |
1054 | 1063 | 'wpReason', 120, $defaultSummary ) . "<br />"; |
1055 | 1064 | $form .= Html::input( 'wpSubmit', wfMsg( 'revreview-reject-confirm' ), 'submit' ); |