https://bugzilla.wikimedia.org/show_bug.cgi?id=28046
Summary: Make licenses configurable with LocalSettings.php
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Normal
Component: UploadWizard
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Blocks: 27260
(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.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l