Merge "API edit: allow ConfirmEdit to use the merged parse"
[lhc/web/wiklou.git] / includes / api / ApiEditPage.php
index 7f4b222..92c951d 100644 (file)
@@ -195,9 +195,9 @@ class ApiEditPage extends ApiBase {
                                        list( $params['undo'], $params['undoafter'] ) =
                                                array( $params['undoafter'], $params['undo'] );
                                }
-                               $undoafterRev = Revision::newFromID( $params['undoafter'] );
+                               $undoafterRev = Revision::newFromId( $params['undoafter'] );
                        }
-                       $undoRev = Revision::newFromID( $params['undo'] );
+                       $undoRev = Revision::newFromId( $params['undo'] );
                        if ( is_null( $undoRev ) || $undoRev->isDeleted( Revision::DELETED_TEXT ) ) {
                                $this->dieUsageMsg( array( 'nosuchrevid', $params['undo'] ) );
                        }
@@ -253,7 +253,8 @@ class ApiEditPage extends ApiBase {
                        'model' => $contentHandler->getModelID(),
                        'wpEditToken' => $params['token'],
                        'wpIgnoreBlankSummary' => '',
-                       'wpIgnoreBlankArticle' => true
+                       'wpIgnoreBlankArticle' => true,
+                       'wpIgnoreSelfRedirect' => true,
                );
 
                if ( !is_null( $params['summary'] ) ) {