* (bug 12211) Show some gadgets only for admins
* (bug 13742) Allow for gadgets to be turned on by default
I'm a bit leery of the 'on by default' entirely at the moment. :)
A few comments:
* The readme examples don't seem to clearly show the option format
* Why are numeric constants being used as indexes to the option array? Strings are easier to work with and debug.
* There's a lot of stuff like this which feels very ugly:
if( isset( $gadget->options[Gadget::RIGHTS] ) && !empty( $gadget->options[Gadget::RIGHTS] ) ) {
Since it's all hard-coded anyway, why not just do something nice and clear like this?
if( !empty( $gadget->rights ) ) {
* And this:
if( wfGadgetAllowed( $gadget->options ) ) {
to:
if( $gadget->isAllowed() ) {