Last modified: 2007-01-04 07:12:06 UTC
The new undo function does not work for the last edit of a page. When using the undo function, the edit page says "Undo succeeded" but the text of the current revision is loaded into the edit box. So no changes are made to the page when saving (and the undo does not succeed).
The problem is not only with the last edit. Old edits that has the same result as the current edit will cause the same bug. Here is an example: 1. User A vandalises the beginning of a page 2. User B vandalises a different part of the page. This does not interfere with the first edit. 3. User C undoes the second vandalism. This does not interfere with the first edit, but the resulting page is the same as that of vandlism 1. 4. User D cannot undo the first vandalism. I think the problem is in the getContent() function in the EditPage class. This test is true when User D tries to undo the first edit: #No use doing a merge if it's just a straight revert. if ($currev_text != $undorev_text) { $result = wfMerge($undorev_text, $oldrev_text, $currev_text, $text); } else { $result = true; } In my example a merge needs to be done. The test should check if $undo_rev is the same as $current_rev (not if the texts are the same). And if undo_rev is current_rev, $text needs to be assigned.
*** Bug 8362 has been marked as a duplicate of this bug. ***
Fixed in r18546.
*** Bug 8483 has been marked as a duplicate of this bug. ***