Last modified: 2007-01-04 07:12:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8351 - Undo last edit does not work
Undo last edit does not work
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 8362 8483 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-21 15:40 UTC by Lejonel
Modified: 2007-01-04 07:12 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lejonel 2006-12-21 15:40:32 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).
Comment 1 Lejonel 2006-12-21 16:21:43 UTC
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.
Comment 2 Brion Vibber 2006-12-24 01:53:03 UTC
*** Bug 8362 has been marked as a duplicate of this bug. ***
Comment 3 Brion Vibber 2006-12-24 02:04:27 UTC
Fixed in r18546.
Comment 4 Andrew Garrett 2007-01-04 07:12:06 UTC
*** Bug 8483 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links