Merge "Passing the undid revisionId from the API request to the WebRequest"
[lhc/web/wiklou.git] / includes / api / ApiEditPage.php
index ec1b06e..4cb91bc 100644 (file)
@@ -246,6 +246,11 @@ class ApiEditPage extends ApiBase {
                        $requestArray['wpSectionTitle'] = $params['sectiontitle'];
                }
 
+               // TODO: Pass along information from 'undoafter' as well
+               if ( $params['undo'] > 0 ) {
+                       $requestArray['wpUndidRevision'] = $params['undo'];
+               }
+
                // Watch out for basetimestamp == ''
                // wfTimestamp() treats it as NOW, almost certainly causing an edit conflict
                if ( !is_null( $params['basetimestamp'] ) && $params['basetimestamp'] != '' ) {