From f245a2f9ef3716836d859af5c102d5be7c3beab8 Mon Sep 17 00:00:00 2001 From: Kaldari Date: Sun, 28 Oct 2012 16:05:40 -0700 Subject: [PATCH] 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 --- includes/api/ApiEditPage.php | 5 +++++ 1 file changed, 5 insertions(+) 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'] != '' ) { -- 2.20.1