https://bugzilla.wikimedia.org/show_bug.cgi?id=30783
Web browser: ---
Bug #: 30783
Summary: mw.config.get and mw.config.set should allow
additional calling patterns
Product: MediaWiki
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Resource Loader
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Created attachment 9020
--> https://bugzilla.wikimedia.org/attachment.cgi?id=9020
more call patterns for get and set
Currently mw.config.get can be called with:
* mw.config.get( 'what' );
* mw.config.get( 'what', 'fallback' );
* mw.config.get( [ 'what1', 'what2' ] );
* mw.config.get( [ 'what1', 'what2' ], 'fallback' );
However mw.config.get should also allow:
* mw.config.get( [ 'what1', 'what2' ], [ 'fallback1', 'fallback2' ] );
* mw.config.get( {
'what1': 'fallback1',
'what2': 'fallback2'
});
* mw.config.get( [ 'what1', 'what2' ], {
'what1': 'fallback1',
'what2': 'fallback2'
});
Currently mw.config.set can be called with:
* mw.config.set( 'what', 'value' );
* mw.config.set({ 'what1': 'value1', 'what2': 'value2' });
However mw.config.set should also allow:
* mw.config.set( [ 'what1', 'what2' ], [ 'value1', 'value2' ] );
I think these additions would allow more flexibility without having to
resort to calling get and set in loops at times.
I've included a patch to allow these call patterns.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l