From 1ad692dcee1f0d56798351f02b0f062e71c2150f Mon Sep 17 00:00:00 2001 From: Jayprakash12345 <0freerunning@gmail.com> Date: Fri, 9 Mar 2018 03:41:25 +0000 Subject: [PATCH] Remove deprecated dieUsage method Bug: T189222 Change-Id: I231f938d6813a8e588991e8f3a2645a0c320aeaa --- api/ApiULSLocalization.php | 6 +----- extension.json | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/api/ApiULSLocalization.php b/api/ApiULSLocalization.php index c86b5db9..f3b2cc35 100644 --- a/api/ApiULSLocalization.php +++ b/api/ApiULSLocalization.php @@ -30,11 +30,7 @@ class ApiULSLocalization extends ApiBase { $params = $this->extractRequestParams(); $language = $params['language']; if ( !Language::isValidCode( $language ) ) { - if ( is_callable( [ $this, 'dieWithError' ] ) ) { - $this->dieWithError( [ 'apierror-invalidlang', 'language' ], 'invalidlanguage' ); - } else { - $this->dieUsage( 'Invalid language', 'invalidlanguage' ); - } + $this->dieWithError( [ 'apierror-invalidlang', 'language' ], 'invalidlanguage' ); } $contents = ULSJsonMessageLoader::getMessages( $language ); // Output the file's contents raw diff --git a/extension.json b/extension.json index 015feb6d..f78d9c88 100644 --- a/extension.json +++ b/extension.json @@ -16,7 +16,7 @@ "descriptionmsg": "uls-desc", "license-name": "GPL-2.0-or-later", "requires": { - "MediaWiki": ">= 1.27.0" + "MediaWiki": ">= 1.29.0" }, "Hooks": { "BeforePageDisplay": "UniversalLanguageSelectorHooks::addModules",