Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -98,6 +98,13 @@ |
99 | 99 | |
100 | 100 | $text = $this->mArticle->getContent(); |
101 | 101 | |
| 102 | + if ($undo > 0 && $undoafter > 0 && $undo < $undoafter) { |
| 103 | + # If they got undoafter and undo round the wrong way, switch them |
| 104 | + $temp = $undoafter; |
| 105 | + $undoafter = $undo; |
| 106 | + $undo = $temp; |
| 107 | + } |
| 108 | + |
102 | 109 | if ( $undo > 0 && $undo > $undoafter ) { |
103 | 110 | # Undoing a specific edit overrides section editing; section-editing |
104 | 111 | # doesn't work with undoing. |
Index: trunk/phase3/includes/PageHistory.php |
— | — | @@ -247,6 +247,14 @@ |
248 | 248 | if( $wgUser->isAllowed( 'rollback' ) && $latest ) { |
249 | 249 | $s .= ' '.$this->mSkin->generateRollback( $rev ); |
250 | 250 | } |
| 251 | + |
| 252 | + if ( $wgUser->isAllowed( 'rollback' ) && !is_null($next)) { |
| 253 | + $undolink = $this->mSkin->makeKnownLinkObj( |
| 254 | + $this->mTitle, '('.htmlspecialchars( wfMsg( 'editundo' ) ).')', |
| 255 | + 'action=edit&undoafter=' . $next->rev_id . '&undo=' . $rev->getId(), |
| 256 | + '', '', '', null ); |
| 257 | + $s .= ' <span class="mw-history-undo"> '."$undolink </span>"; |
| 258 | + } |
251 | 259 | |
252 | 260 | wfRunHooks( 'PageHistoryLineEnding', array( &$row , &$s ) ); |
253 | 261 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -122,6 +122,8 @@ |
123 | 123 | * (bug 10438) HTML TeX formulas should not wrap |
124 | 124 | * Introduce "raw editing" mode for the watchlist, to allow bulk additions, |
125 | 125 | removals, and convenient exporting of watchlist contents |
| 126 | +* Put an (undo) button on the page history page, for people with rollback |
| 127 | + permission only. |
126 | 128 | |
127 | 129 | == Bugfixes since 1.10 == |
128 | 130 | |