Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -106,7 +106,9 @@ |
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | | - $this->mModules = self :: $Modules; |
| 110 | + global $wgAPIModules; // extension modules |
| 111 | + $this->mModules = $wgAPIModules + self :: $Modules; |
| 112 | + |
111 | 113 | $this->mModuleNames = array_keys($this->mModules); // todo: optimize |
112 | 114 | $this->mFormats = self :: $Formats; |
113 | 115 | $this->mFormatNames = array_keys($this->mFormats); // todo: optimize |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2700,6 +2700,13 @@ |
2701 | 2701 | $wgEnableWriteAPI = false; |
2702 | 2702 | |
2703 | 2703 | /** |
| 2704 | + * API module extensions |
| 2705 | + * Associative array mapping module name to class name. |
| 2706 | + * Extension modules may override the core modules. |
| 2707 | + */ |
| 2708 | +$wgAPIModules = array(); |
| 2709 | + |
| 2710 | +/** |
2704 | 2711 | * Parser test suite files to be run by parserTests.php when no specific |
2705 | 2712 | * filename is passed to it. |
2706 | 2713 | * |