Last modified: 2009-04-27 06:15:34 UTC
Created attachment 5194 [details] class PreferencesTemplate extends QuickTemplate As Brion said in a different bug, the PreferencesForm class needs to be written where it is more customizable by hooks, etc. I decided that the current structure of the Login and User Creation form should do good for the Preferences Form, and I wrote a basic class called "PreferencesTemplate" (extending QuickTemplate). The class makes the form customizable by creating a dynamic array with each section of the preferences form in different keys, and then passing that array to the hooks. There are admittedly a few bugs, but I figured this was a good start in place of the current situation. Hope everybody likes it.
Comment on attachment 5194 [details] class PreferencesTemplate extends QuickTemplate Marked attachment obsolete. Please provice a unified diff as patch, never complete files.
Got it. Just hold a second.
Created attachment 5195 [details] Unified Diff of class.
Created attachment 5217 [details] Improved - Contains updated extra inputs function and now has a custom set() function to improve security.
How would this integrate with code? Does SpecialPreferences just call the template in its execute() method, or what? By itself it does nothing.
It cannot do anything alone. You can close this bug if you want. I just figured I would draft something should anybody decide to take action on this (I do not have nearly enough time). The execute() function needs to be rewritten, and that's about it.
Fixed in r49790.