Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php |
— | — | @@ -101,6 +101,7 @@ |
102 | 102 | 'review_denied' => 'Permission denied.', |
103 | 103 | 'review_param_missing' => 'A parameter is missing or invalid.', |
104 | 104 | 'review_cannot_undo' => 'Cannot undo these changes because further pending edits changed the same areas.', |
| 105 | + 'review_cannot_reject' => 'Cannot reject these changes because someone already accepted some (or all) of the edits.', |
105 | 106 | 'review_reject_excessive' => 'Cannot reject this many edits at once.', |
106 | 107 | |
107 | 108 | 'revreview-current' => 'Pending changes', |
— | — | @@ -252,15 +253,15 @@ |
253 | 254 | 'revreview-restriction-none' => 'none', |
254 | 255 | |
255 | 256 | 'revreview-reject-header' => 'Reject changes for $1', |
256 | | - 'revreview-reject-text-list' => 'By completing this action, you will be \'\'\'rejecting\'\'\' the following changes:', |
| 257 | + 'revreview-reject-text-list' => 'By completing this action, you will be \'\'\'rejecting\'\'\' the following {{PLURAL:$1|change|changes}}:', |
257 | 258 | 'revreview-reject-text-revto' => 'This will revert the page back to the [{{fullurl:$1|oldid=$2}} version as of $3].', |
258 | 259 | 'revreview-reject-summary' => 'Edit summary:', |
259 | 260 | 'revreview-reject-confirm' => 'Reject these changes', |
260 | 261 | 'revreview-reject-cancel' => 'Cancel', |
261 | | - 'revreview-reject-summary-cur' => 'Rejected the last {{PLURAL:$1|one change|$1 changes}} (by $2) and restored revision $3 by $4', |
262 | | - 'revreview-reject-summary-old' => 'Rejected the first {{PLURAL:$1|one change|$1 changes}} (by $2) that followed revision $3 by $4', |
263 | | - 'revreview-reject-summary-cur-short' => 'Rejected the last {{PLURAL:$1|one change|$1 changes}} and restored revision $2 by $3', |
264 | | - 'revreview-reject-summary-old-short' => 'Rejected the first {{PLURAL:$1|one change|$1 changes}} that followed revision $2 by $3', |
| 262 | + 'revreview-reject-summary-cur' => 'Rejected the last {{PLURAL:$1|change|$1 changes}} (by $2) and restored revision $3 by $4', |
| 263 | + 'revreview-reject-summary-old' => 'Rejected the first {{PLURAL:$1|change|$1 changes}} (by $2) that followed revision $3 by $4', |
| 264 | + 'revreview-reject-summary-cur-short' => 'Rejected the last {{PLURAL:$1|change|$1 changes}} and restored revision $2 by $3', |
| 265 | + 'revreview-reject-summary-old-short' => 'Rejected the first {{PLURAL:$1|change|$1 changes}} that followed revision $2 by $3', |
265 | 266 | 'revreview-reject-usercount' => '{{PLURAL:$1|one user|$1 users}}', |
266 | 267 | |
267 | 268 | 'revreview-reviewlink' => 'pending edits', |
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -318,6 +318,10 @@ |
319 | 319 | } elseif ( !$newRev || $newRev->isDeleted( Revision::DELETED_TEXT ) ) { |
320 | 320 | return 'review_bad_oldid'; |
321 | 321 | } |
| 322 | + $srev = FlaggedRevision::newFromStable( $this->page, FR_MASTER ); |
| 323 | + if ( $srev && $srev->getRevId() > $oldRev->getId() ) { |
| 324 | + return 'review_cannot_reject'; // not really a use case |
| 325 | + } |
322 | 326 | # Go to confirmation screen first |
323 | 327 | if ( !$this->rejectConfirm ) { |
324 | 328 | $status = $this->rejectConfirmationForm( $oldRev, $newRev ); |
— | — | @@ -1033,7 +1037,7 @@ |
1034 | 1038 | } |
1035 | 1039 | |
1036 | 1040 | // List of revisions being undone... |
1037 | | - $wgOut->addWikiMsg( 'revreview-reject-text-list' ); |
| 1041 | + $wgOut->addWikiMsg( 'revreview-reject-text-list', count( $rejectIds ) ); |
1038 | 1042 | $wgOut->addHtml( '<ul>' ); |
1039 | 1043 | // FIXME: we need a generic revision list class |
1040 | 1044 | $spRevDelete = SpecialPage::getPage( 'RevisionReview' ); |
— | — | @@ -1089,8 +1093,7 @@ |
1090 | 1094 | $wgOut->addHtml( '</div>' ); |
1091 | 1095 | |
1092 | 1096 | $form = Xml::openElement( 'form', |
1093 | | - array( 'method' => 'POST', 'action' => $thisPage->getFullUrl() ) |
1094 | | - ); |
| 1097 | + array( 'method' => 'POST', 'action' => $thisPage->getFullUrl() ) ); |
1095 | 1098 | $form .= Html::hidden( 'action', 'reject' ); |
1096 | 1099 | $form .= Html::hidden( 'wpReject', 1 ); |
1097 | 1100 | $form .= Html::hidden( 'wpRejectConfirm', 1 ); |
— | — | @@ -1102,8 +1105,10 @@ |
1103 | 1106 | $form .= Xml::inputLabel( wfMsg( 'revreview-reject-summary' ), 'wpReason', |
1104 | 1107 | 'wpReason', 120, $defaultSummary ) . "<br />"; |
1105 | 1108 | $form .= Html::input( 'wpSubmit', wfMsg( 'revreview-reject-confirm' ), 'submit' ); |
1106 | | - $form .= Html::input( 'wpCancel', wfMsg( 'revreview-reject-cancel' ), |
1107 | | - 'button', array( 'onClick' => 'history.back();' ) ); |
| 1109 | + $form .= ' '; |
| 1110 | + $form .= $this->skin->link( $this->page, wfMsg( 'revreview-reject-cancel' ), |
| 1111 | + array( 'onClick' => 'history.back()' ), |
| 1112 | + array( 'oldid' => $this->refid, 'diff' => $this->oldid ) ); |
1108 | 1113 | $form .= Xml::closeElement( 'form' ); |
1109 | 1114 | |
1110 | 1115 | $wgOut->addHtml( $form ); |
Index: trunk/extensions/FlaggedRevs/client/review.js |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | selectedlevel = levels[0].selectedIndex; |
87 | 87 | // Update color. Opera does this already, and doing so |
88 | 88 | // seems to kill custom pretty opera skin form styling. |
89 | | - if( navigator.appName != 'Opera') { |
| 89 | + if( navigator.appName != 'Opera' ) { |
90 | 90 | value = levels[0].getElementsByTagName('option')[selectedlevel].value; |
91 | 91 | levels[0].className = 'fr-rating-option-' + value; |
92 | 92 | } |