Last modified: 2011-03-25 00:46:39 UTC
(This isn't a new bug, it's been in the back of my mind for a while... just committing to bugzilla) Currently we glean config from LocalSettings (for some overall behaviour) and more config from UploadWizardPage.js (such as layout constants, available licenses). We need to pull this stuff from LocalSettings.php instead. mdale has a nice system for this in MwEmbed, where default settings can be loaded from a well known PHP file, and possibly overridden by LocalSettings.php. The config.php uses a bare return array(... ) so the value of the entire config array is returned by include(). e.g. $configPath = $fullResourcePath . '/' . $moduleName . '.config.php'; if( is_file( $configPath ) ){ self::$moduleConfig = array_merge( self::$moduleConfig, include( $configPath ) ); } However, this means he writes a sort of config system on top of mediawiki's global-oriented config system... we can be less disruptive with something like this: LocalSettings.php: $wgUploadWizardConfig = array( key => val ... ); Also see bug 26901 because this affects the add-media-wizard case of post-page-load dynamic loading.
The nice thing about the config file type system is that default configuration is cleanly separated from the LocalSettings.php user configuration. This was added for upload wizard in r83974 ( marked bug resolved )
Confirmed, this does work. Thanks Michael!