Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/338997 )

Change subject: API: Add "messagecode" to AuthManager responses
......................................................................

API: Add "messagecode" to AuthManager responses

Following the same logic that the API uses for assigning codes to
warnings and errors.

Bug: T158609
Change-Id: I4e1a4f252e12e990727e8e9ada4ea00c526e3f8f
---
M includes/api/ApiAuthManagerHelper.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/338997/1

diff --git a/includes/api/ApiAuthManagerHelper.php 
b/includes/api/ApiAuthManagerHelper.php
index 5327d7a..d037c36 100644
--- a/includes/api/ApiAuthManagerHelper.php
+++ b/includes/api/ApiAuthManagerHelper.php
@@ -208,6 +208,7 @@
                        $res->status === AuthenticationResponse::RESTART
                ) {
                        $this->formatMessage( $ret, 'message', $res->message );
+                       $ret['messagecode'] = ApiMessage::create( $res->message 
)->getApiCode();
                }
 
                if ( $res->status === AuthenticationResponse::FAIL ||

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e1a4f252e12e990727e8e9ada4ea00c526e3f8f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>

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

Reply via email to