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

Change subject: Remove support for $wgEnableAPI
......................................................................


Remove support for $wgEnableAPI

Bug: T115414
Change-Id: Idf98109139972adaeb924cbe6d91dc0e37511b23
---
M SpecialApiSandbox.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 0 insertions(+), 8 deletions(-)

Approvals:
  Siebrand: Looks good to me, but someone else must approve
  MaxSem: Looks good to me, approved
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/SpecialApiSandbox.php b/SpecialApiSandbox.php
index e0ab433..98b37c5 100644
--- a/SpecialApiSandbox.php
+++ b/SpecialApiSandbox.php
@@ -22,13 +22,7 @@
         * @param $par string|null Parameters passed to the page
         */
        public function execute( $par ) {
-               global $wgEnableAPI;
-
                $out = $this->getContext()->getOutput();
-
-               if ( !$wgEnableAPI ) {
-                       $out->showErrorPage( 'error', 'apisb-api-disabled' );
-               }
 
                $this->setHeaders();
                $out->addModules( 'ext.apiSandbox' );
diff --git a/i18n/en.json b/i18n/en.json
index acd4d1e..234263c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -6,7 +6,6 @@
        "apisandbox": "API sandbox",
        "apisb-no-js": "'''Error:''' this feature requires JavaScript.",
        "apisb-intro": "Use this page to experiment with the '''MediaWiki web 
service API'''.\nRefer to [//www.mediawiki.org/wiki/API:Main_page the API 
documentation] for further details of API usage. Example: 
[//www.mediawiki.org/wiki/API#A_simple_example get the content of a Main Page]. 
Select an action to see more examples.\n\nNote that, although this is a 
sandbox, actions you carry out on this page may modify the wiki.",
-       "apisb-api-disabled": "API is disabled on this site.",
        "apisb-legend-parameters": "Parameters",
        "apisb-legend-result": "Result",
        "apisb-legend-generic-parameters": "Generic parameters",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 766a9d8..f2b75e6 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,7 +17,6 @@
        "apisandbox": "{{doc-special|ApiSandbox}}",
        "apisb-no-js": "Used as error message in HTML 
<code><nowiki><noscript></nowiki></code> tag in [[Special:ApiSandbox]].",
        "apisb-intro": "Used as intro text in [[Special:ApiSandbox]].\n\nThis 
message is followed by the ApiSandbox form.",
-       "apisb-api-disabled": "Used as error message in 
[[Special:ApiSandbox]].",
        "apisb-legend-parameters": "Used as fieldset label in 
[[Special:ApiSandbox]].\n{{Identical|Parameter}}",
        "apisb-legend-result": "Used as fieldset label in 
[[Special:ApiSandbox]].\n\nThe fieldset contains read-only fields with info 
about an executed API request.\n{{Identical|Result}}",
        "apisb-legend-generic-parameters": "Used as fieldset label in 
[[Special:ApiSandbox]].",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf98109139972adaeb924cbe6d91dc0e37511b23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApiSandbox
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to