http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73511

Revision: 73511
Author:   tstarling
Date:     2010-09-22 08:18:54 +0000 (Wed, 22 Sep 2010)

Log Message:
-----------
MFT 73510: allow API modules to be disabled in configuration

Modified Paths:
--------------
    branches/wmf/1.16wmf4/includes/DefaultSettings.php
    branches/wmf/1.16wmf4/includes/api/ApiMain.php

Property Changed:
----------------
    branches/wmf/1.16wmf4/includes/DefaultSettings.php
    branches/wmf/1.16wmf4/includes/api/ApiMain.php

Modified: branches/wmf/1.16wmf4/includes/DefaultSettings.php
===================================================================
--- branches/wmf/1.16wmf4/includes/DefaultSettings.php  2010-09-22 08:14:19 UTC 
(rev 73510)
+++ branches/wmf/1.16wmf4/includes/DefaultSettings.php  2010-09-22 08:18:54 UTC 
(rev 73511)
@@ -3926,6 +3926,13 @@
 $wgAPIListModules = array();
 
 /**
+ * Disabled API actions. To disable an API action, add its name here, for 
+ * example:
+ *    $wgAPIDisabledActions[] = 'parse';
+ */
+$wgAPIDisabledActions = array();
+
+/**
  * Maximum amount of rows to scan in a DB query in the API
  * The default value is generally fine
  */


Property changes on: branches/wmf/1.16wmf4/includes/DefaultSettings.php
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/REL1_15/phase3/includes/DefaultSettings.php:51646
/branches/sqlite/includes/DefaultSettings.php:58211-58321
/branches/wmf-deployment/includes/DefaultSettings.php:53381,60970
/trunk/phase3/includes/DefaultSettings.php:63549,63764,63897-63901,64692,64851,64856,64876,64892,64918,64948,65387,65391,65555,65590,65965,66151,66158,66614,71059,71098
   + /branches/REL1_15/phase3/includes/DefaultSettings.php:51646
/branches/sqlite/includes/DefaultSettings.php:58211-58321
/branches/wmf-deployment/includes/DefaultSettings.php:53381,60970
/trunk/phase3/includes/DefaultSettings.php:63549,63764,63897-63901,64692,64851,64856,64876,64892,64918,64948,65387,65391,65555,65590,65965,66151,66158,66614,71059,71098,73510

Modified: branches/wmf/1.16wmf4/includes/api/ApiMain.php
===================================================================
--- branches/wmf/1.16wmf4/includes/api/ApiMain.php      2010-09-22 08:14:19 UTC 
(rev 73510)
+++ branches/wmf/1.16wmf4/includes/api/ApiMain.php      2010-09-22 08:18:54 UTC 
(rev 73511)
@@ -160,6 +160,11 @@
                global $wgAPIModules; // extension modules
                $this->mModules = $wgAPIModules + self :: $Modules;
 
+               global $wgAPIDisabledActions;
+               foreach ( $wgAPIDisabledActions as $action ) {
+                       unset( $this->mModules[$action] );
+               }
+
                $this->mModuleNames = array_keys( $this->mModules );
                $this->mFormats = self :: $Formats;
                $this->mFormatNames = array_keys( $this->mFormats );


Property changes on: branches/wmf/1.16wmf4/includes/api/ApiMain.php
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/REL1_15/phase3/includes/api/ApiMain.php:51646
/branches/REL1_16/phase3/includes/api/ApiMain.php:69932
/branches/sqlite/includes/api/ApiMain.php:58211-58321
/branches/wmf-deployment/includes/api/ApiMain.php:53381,59952,60970
/trunk/phase3/includes/api/ApiMain.php:63549,63764,63897-63901,64454,66486,69339,69347,69350,69369,69379,69776,69931,70078,71059,71098,73510



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

Reply via email to