Michael Daly wrote:
Jan Steinman wrote:
How about a single line in LocalSettings.php that includes a "don't touch me" file that is maintained only via the ExtensionManager?
Rather than mucking about excessively with LocalSettings.php and global variables, consider using a more object-oriented approach and taking advantage of Wiki.php. It's there to help eliminate globals but isn't used much yet. If ExtensionManager is a proper class, you could have Wiki.php instantiate a singleton and have it handle _all_ extension stuff (including burying things like $wgAutoloadClasses, $wgSpecialPages and $wgHooks handling for extensions) as well.
Mike
Wiki.php is only loaded on index.php calls. It's not universal to the MediaWiki framework, and it does nothing to eliminate globals.
Extension loading should be done in Setup.php. A list of extensions should be taken from the configuration (be that LocalSettings.php or some other system). Capability lists can then be loaded, merged and cached. See this post and the thread which follows it:
http://lists.wikimedia.org/pipermail/wikitech-l/2006-July/024697.html
I don't see any need to treat extension selection differently to any other type of configuration -- it all has to be optionally web-based sooner or later.
-- Tim Starling