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

Change subject: API: Remove unnecessary backwards-compatibility
......................................................................

API: Remove unnecessary backwards-compatibility

This extension already requires 1.31, and ApiBase::dieWithError was introduced
in 1.29.

Change-Id: Ieb42073010caffb1f6811d3a2f629aa60c1d2034
---
M common/ApiScribuntoConsole.php
1 file changed, 2 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/06/403406/1

diff --git a/common/ApiScribuntoConsole.php b/common/ApiScribuntoConsole.php
index 6bfb7d0..28a86c6 100644
--- a/common/ApiScribuntoConsole.php
+++ b/common/ApiScribuntoConsole.php
@@ -13,11 +13,7 @@
 
                $title = Title::newFromText( $params['title'] );
                if ( !$title ) {
-                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
-                               $this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['title'] ) ] );
-                       } else {
-                               $this->dieUsageMsg( [ 'invalidtitle', 
$params['title'] ] );
-                       }
+                       $this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['title'] ) ] );
                }
 
                if ( $params['session'] ) {
@@ -59,14 +55,7 @@
                }
 
                if ( $newSession['size'] > self::SC_MAX_SIZE ) {
-                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
-                               $this->dieWithError( 
'scribunto-console-too-large' );
-                       } else {
-                               $this->dieUsage(
-                                       $this->msg( 
'scribunto-console-too-large' )->text(),
-                                       'scribunto-console-too-large'
-                               );
-                       }
+                       $this->dieWithError( 'scribunto-console-too-large' );
                }
                $result = $this->runConsole( [
                        'title' => $title,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb42073010caffb1f6811d3a2f629aa60c1d2034
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

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

Reply via email to