jenkins-bot has submitted this change and it was merged.

Change subject: API: Call dieUsage() on $this, not $this->getResult()
......................................................................


API: Call dieUsage() on $this, not $this->getResult()

While this will likely change the error codes being returned, I don't
see anything in the JS that checks them.

Change-Id: I86ca37d64cc3f7086d3babb41f9e91e760178984
---
M includes/api/ApiFlowBase.php
M includes/api/ApiFlowBaseGet.php
M includes/api/ApiFlowBasePost.php
3 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiFlowBase.php b/includes/api/ApiFlowBase.php
index b6d3e68..fb42826 100644
--- a/includes/api/ApiFlowBase.php
+++ b/includes/api/ApiFlowBase.php
@@ -112,7 +112,7 @@
                                $errors = $block->getErrors();
 
                                foreach( $errors as $key ) {
-                                       $this->getResult()->dieUsage(
+                                       $this->dieUsage(
                                                $block->getErrorMessage( $key 
)->parse(),
                                                $key,
                                                200,
diff --git a/includes/api/ApiFlowBaseGet.php b/includes/api/ApiFlowBaseGet.php
index 1cfe59f..1337766 100644
--- a/includes/api/ApiFlowBaseGet.php
+++ b/includes/api/ApiFlowBaseGet.php
@@ -37,7 +37,7 @@
                // If nothing could render, we'll consider that an error (at 
least some
                // block should've been able to render a GET request)
                if ( !$output[$action]['result'] ) {
-                       $this->getResult()->dieUsage(
+                       $this->dieUsage(
                                wfMessage( 'flow-error-no-render' )->parse(),
                                'no-render',
                                200,
diff --git a/includes/api/ApiFlowBasePost.php b/includes/api/ApiFlowBasePost.php
index 014358f..0271d06 100644
--- a/includes/api/ApiFlowBasePost.php
+++ b/includes/api/ApiFlowBasePost.php
@@ -25,7 +25,7 @@
                // If nothing was committed, we'll consider that an error (at 
least some
                // block should've been able to process the POST request)
                if ( !count( $blocksToCommit ) ) {
-                       $this->getResult()->dieUsage(
+                       $this->dieUsage(
                                wfMessage( 'flow-error-no-commit' )->parse(),
                                'no-commit',
                                200,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I86ca37d64cc3f7086d3babb41f9e91e760178984
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to