r73511 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73510‎ | r73511 | r73512 >
Date:08:18, 22 September 2010
Author:tstarling
Status:reverted
Tags:
Comment:
MFT 73510: allow API modules to be disabled in configuration
Modified paths:
  • /branches/wmf/1.16wmf4/includes/DefaultSettings.php (modified) (history)
  • /branches/wmf/1.16wmf4/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/includes/api/ApiMain.php
@@ -160,6 +160,11 @@
161161 global $wgAPIModules; // extension modules
162162 $this->mModules = $wgAPIModules + self :: $Modules;
163163
 164+ global $wgAPIDisabledActions;
 165+ foreach ( $wgAPIDisabledActions as $action ) {
 166+ unset( $this->mModules[$action] );
 167+ }
 168+
164169 $this->mModuleNames = array_keys( $this->mModules );
165170 $this->mFormats = self :: $Formats;
166171 $this->mFormatNames = array_keys( $this->mFormats );
Property changes on: branches/wmf/1.16wmf4/includes/api/ApiMain.php
___________________________________________________________________
Added: svn:mergeinfo
167172 Merged /branches/REL1_15/phase3/includes/api/ApiMain.php:r51646
168173 Merged /branches/REL1_16/phase3/includes/api/ApiMain.php:r69932
169174 Merged /branches/sqlite/includes/api/ApiMain.php:r58211-58321
170175 Merged /trunk/phase3/includes/api/ApiMain.php:r63549,63764,63897-63901,64454,66486,69339,69347,69350,69369,69379,69776,69931,70078,71059,71098,73510
171176 Merged /branches/wmf-deployment/includes/api/ApiMain.php:r53381,59952,60970
Index: branches/wmf/1.16wmf4/includes/DefaultSettings.php
@@ -3926,6 +3926,13 @@
39273927 $wgAPIListModules = array();
39283928
39293929 /**
 3930+ * Disabled API actions. To disable an API action, add its name here, for
 3931+ * example:
 3932+ * $wgAPIDisabledActions[] = 'parse';
 3933+ */
 3934+$wgAPIDisabledActions = array();
 3935+
 3936+/**
39303937 * Maximum amount of rows to scan in a DB query in the API
39313938 * The default value is generally fine
39323939 */
Property changes on: branches/wmf/1.16wmf4/includes/DefaultSettings.php
___________________________________________________________________
Modified: svn:mergeinfo
39333940 Merged /trunk/phase3/includes/DefaultSettings.php:r73510

Follow-up revisions

RevisionCommit summaryAuthorDate
r73514Revert r73511. Disabling API modules has been possible since r41268 and is do...catrope11:56, 22 September 2010
r73515Revert r73510 (trunk version of r73511 ; missed the fact that the latter was ...catrope12:04, 22 September 2010

Status & tagging log