r25364 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25363‎ | r25364 | r25365 >
Date:15:23, 31 August 2007
Author:tstarling
Status:old
Tags:
Comment:
Allow API modules to be defined in extensions
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMain.php
@@ -106,7 +106,9 @@
107107 }
108108 }
109109
110 - $this->mModules = self :: $Modules;
 110+ global $wgAPIModules; // extension modules
 111+ $this->mModules = $wgAPIModules + self :: $Modules;
 112+
111113 $this->mModuleNames = array_keys($this->mModules); // todo: optimize
112114 $this->mFormats = self :: $Formats;
113115 $this->mFormatNames = array_keys($this->mFormats); // todo: optimize
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2700,6 +2700,13 @@
27012701 $wgEnableWriteAPI = false;
27022702
27032703 /**
 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+/**
27042711 * Parser test suite files to be run by parserTests.php when no specific
27052712 * filename is passed to it.
27062713 *

Follow-up revisions

RevisionCommit summaryAuthorDate
r25372Merged revisions 25338-25371 via svnmerge from...david18:18, 31 August 2007

Status & tagging log