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)
1  2 
includes/EditPage.php

diff --combined includes/EditPage.php
@@@ -930,10 -930,6 +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 );
                                        # 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 ) ) {
  
                        $wgOut->addModules( 'mediawiki.action.edit.editWarning' );
                }
  
 -              // Bug #19334: textarea jumps when editing articles in IE8
 -              $wgOut->addStyle( 'common/IE80Fixes.css', 'screen', 'IE 8' );
 -
                $wgOut->setRobotPolicy( 'noindex,nofollow' );
  
                # Enabled article-related sidebar, toplinks, etc.
@@@ -3316,7 -3313,7 +3310,7 @@@ HTM
         */
        static function getEditToolbar() {
                global $wgStylePath, $wgContLang, $wgLang, $wgOut;
 -              global $wgUseTeX, $wgEnableUploads, $wgForeignFileRepos;
 +              global $wgEnableUploads, $wgForeignFileRepos;
  
                $imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos );
  
                                'tip'    => wfMessage( 'media_tip' )->text(),
                                'key'    => 'M'
                        ) : false,
 -                      $wgUseTeX ? array(
 +                      class_exists( 'MathRenderer' ) ? array(
                                'image'  => $wgLang->getImageFile( 'button-math' ),
                                'id'     => 'mw-editbutton-math',
                                'open'   => "<math>",