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

Change subject: Update for API error i18n
......................................................................


Update for API error i18n

See Iae0e2ce3.

Change-Id: I0ed670c8af2863c9dab60c1cdbb85500916a6084
---
M includes/ApiHooks.php
1 file changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/includes/ApiHooks.php b/includes/ApiHooks.php
index 31071dc..ee80602 100644
--- a/includes/ApiHooks.php
+++ b/includes/ApiHooks.php
@@ -103,7 +103,11 @@
                        : [];
                if ( isset( $show['oresreview'] ) || isset( 
$show['!oresreview'] ) ) {
                        if ( isset( $show['oresreview'] ) && isset( 
$show['!oresreview'] ) ) {
-                               $module->dieUsageMsg( 'show' );
+                               if ( is_callable( [ $module, 'dieWithError' ] ) 
) {
+                                       $module->dieWithError( 'apierror-show' 
);
+                               } else {
+                                       $module->dieUsageMsg( 'show' );
+                               }
                        }
 
                        $threshold = Hooks::getDamagingThreshold( 
$module->getUser() );
@@ -398,7 +402,11 @@
                $show = isset( $params['show'] ) ? array_flip( $params['show'] 
) : [];
                if ( isset( $show['oresreview'] ) || isset( 
$show['!oresreview'] ) ) {
                        if ( isset( $show['oresreview'] ) && isset( 
$show['!oresreview'] ) ) {
-                               $module->dieUsageMsg( 'show' );
+                               if ( is_callable( [ $module, 'dieWithError' ] ) 
) {
+                                       $module->dieWithError( 'apierror-show' 
);
+                               } else {
+                                       $module->dieUsageMsg( 'show' );
+                               }
                        }
 
                        $options['filters'][] = isset( $show['oresreview'] ) ? 
'oresreview' : '!oresreview';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ed670c8af2863c9dab60c1cdbb85500916a6084
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to