Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/126192

Change subject: API list=flow: Don't set _element directly
......................................................................

API list=flow: Don't set _element directly

Change-Id: I851223f26cacd165edbadf51e08a64b4fe460d82
---
M includes/api/ApiQueryFlow.php
M maintenance/convertToText.php
M modules/base/ext.flow.base.js
3 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/92/126192/1

diff --git a/includes/api/ApiQueryFlow.php b/includes/api/ApiQueryFlow.php
index 6273601..f3ddf4e 100644
--- a/includes/api/ApiQueryFlow.php
+++ b/includes/api/ApiQueryFlow.php
@@ -44,9 +44,10 @@
                }
 
                $result = array(
-                       '_element' => 'block',
+                       'element' => 'block',
                        'workflow-id' => 
$this->loader->getWorkflow()->getId()->getAlphadecimal(),
                ) + $blockOutput;
+               $this->getResult()->setIndexedTagName( $result, 'block' );
 
                $this->getResult()->addValue( 'query', $this->getModuleName(), 
$result );
        }
diff --git a/maintenance/convertToText.php b/maintenance/convertToText.php
index 4e9a19a..55ee472 100644
--- a/maintenance/convertToText.php
+++ b/maintenance/convertToText.php
@@ -53,7 +53,7 @@
 
                        $flowData = $apiResponse['query']['flow'];
 
-                       if( $flowData["_element"] !== "block" ) {
+                       if( $flowData["element"] !== "block" ) {
                                throw new MWException( "No block data in API 
response" );
                        }
 
diff --git a/modules/base/ext.flow.base.js b/modules/base/ext.flow.base.js
index d3c71bb..b0af36c 100644
--- a/modules/base/ext.flow.base.js
+++ b/modules/base/ext.flow.base.js
@@ -115,7 +115,7 @@
                                        if (
                                                !output.query ||
                                                !output.query.flow ||
-                                               output.query.flow._element !== 
'block'
+                                               output.query.flow.element !== 
'block'
                                        ) {
                                                deferredObject.reject( 
'invalid-result', 'Unable to understand the API result' );
                                                return;

-- 
To view, visit https://gerrit.wikimedia.org/r/126192
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I851223f26cacd165edbadf51e08a64b4fe460d82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to