From: Kaldari Date: Sun, 28 Oct 2012 23:05:40 +0000 (-0700) Subject: Passing the undid revisionId from the API request to the WebRequest X-Git-Tag: 1.31.0-rc.0~21787^2 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=f245a2f9ef3716836d859af5c102d5be7c3beab8;p=lhc%2Fweb%2Fwiklou.git Passing the undid revisionId from the API request to the WebRequest This is so that Echo can detect when a revision is undone via the API. wpUndidRevision is the same param used by the 'undo' button in in the History view. Change-Id: I82440eb442759335800cee49fd53528fcfd92ed6 --- diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index ca62bc6930..3c48d2ce50 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -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'] != '' ) {