Merge "Passing the undid revisionId from the API request to the WebRequest"
authorTychay <tchay@wikimedia.org>
Wed, 31 Oct 2012 23:33:10 +0000 (23:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 31 Oct 2012 23:33:10 +0000 (23:33 +0000)
1  2 
includes/api/ApiEditPage.php

@@@ -246,6 -246,11 +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'] != '' ) {
                        'watch' => 'Add the page to your watchlist',
                        'unwatch' => 'Remove the page from your watchlist',
                        'watchlist' => 'Unconditionally add or remove the page from your watchlist, use preferences or do not change watch',
 -                      'md5' => array( "The MD5 hash of the {$p}text parameter, or the {$p}prependtext and {$p}appendtext parameters concatenated.",
 +                      'md5' => array( "The MD5 hash of the {$p}text parameter, or the {$p}prependtext and {$p}appendtext parameters concatenated.",
                                        'If set, the edit won\'t be done unless the hash is correct' ),
                        'prependtext' => "Add this text to the beginning of the page. Overrides {$p}text",
                        'appendtext' => array( "Add this text to the end of the page. Overrides {$p}text.",