Merge "(bug 56184) Allow 3-way merge from arbitrary revisions"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 29 Jan 2014 23:56:04 +0000 (23:56 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 29 Jan 2014 23:56:04 +0000 (23:56 +0000)
includes/EditPage.php

index 06bdadd..fbfe3ed 100644 (file)
@@ -930,10 +930,6 @@ class EditPage {
                                $undo = $wgRequest->getInt( 'undo' );
 
                                if ( $undo > 0 && $undoafter > 0 ) {
-                                       if ( $undo < $undoafter ) {
-                                               # If they got undoafter and undo round the wrong way, switch them
-                                               list( $undo, $undoafter ) = array( $undoafter, $undo );
-                                       }
 
                                        $undorev = Revision::newFromId( $undo );
                                        $oldrev = Revision::newFromId( $undoafter );
@@ -942,8 +938,6 @@ class EditPage {
                                        # the revisions exist and they were not deleted.
                                        # Otherwise, $content will be left as-is.
                                        if ( !is_null( $undorev ) && !is_null( $oldrev ) &&
-                                               $undorev->getPage() == $oldrev->getPage() &&
-                                               $undorev->getPage() == $this->mTitle->getArticleID() &&
                                                !$undorev->isDeleted( Revision::DELETED_TEXT ) &&
                                                !$oldrev->isDeleted( Revision::DELETED_TEXT ) ) {