[Wikitech-l] A few questions about adding user preferences via the API

2012-09-09 Thread MZMcBride
Forwarding from : --- A lot more functionality around user preferences was added with https://gerrit.wikimedia.org/r/#/c/5126/ Thank you for that. Recently I found that one can add new options (''keys''). This is very useful for Community

Re: [Wikitech-l] A few questions about adding user preferences via the API

2012-09-09 Thread Tyler Romeo
Someone can feel free to correct me if I'm wrong, but currently user preferences uses an HTMLForm object to handle everything, and new preferences can be added arbitrarily using the GetPreferences hook. I'd imagine this will definitely be supported in the future as it is the primary way for extensi

Re: [Wikitech-l] A few questions about adding user preferences via the API

2012-09-10 Thread Krinkle
I think MZMcBride is referring to the fact[1] that the current preferences backend stores whatever it is given, even keys that don't exist anywhere and have no registry or default value. This is inherited by how User.php implements setOption(), saveSettings() and saveOptions(). I personally thin

Re: [Wikitech-l] A few questions about adding user preferences via the API

2012-09-10 Thread Tyler Romeo
It should be noted, though, that only the new API for user options allows this. The GUI user preferences form will ignore any user option that is not added using the GetPreferences hook. *--* *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.co