Last modified: 2009-04-27 06:15:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17235, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15235 - Preferences Form Customization
Preferences Form Customization
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-18 22:13 UTC by Tyler Romeo
Modified: 2009-04-27 06:15 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
class PreferencesTemplate extends QuickTemplate (28.35 KB, application/x-php)
2008-08-18 22:13 UTC, Tyler Romeo
Details
Unified Diff of class. (29.41 KB, patch)
2008-08-18 22:28 UTC, Tyler Romeo
Details
Improved - Contains updated extra inputs function and now has a custom set() function to improve security. (31.07 KB, patch)
2008-08-26 00:00 UTC, Tyler Romeo
Details

Description Tyler Romeo 2008-08-18 22:13:26 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 1 Siebrand Mazeland 2008-08-18 22:16:14 UTC
Comment on attachment 5194 [details]
class PreferencesTemplate extends QuickTemplate

Marked attachment obsolete. Please provice a unified diff as patch, never complete files.
Comment 2 Tyler Romeo 2008-08-18 22:23:09 UTC
Got it. Just hold a second.
Comment 3 Tyler Romeo 2008-08-18 22:28:31 UTC
Created attachment 5195 [details]
Unified Diff of class.
Comment 4 Tyler Romeo 2008-08-26 00:00:01 UTC
Created attachment 5217 [details]
Improved - Contains updated extra inputs function and now has a custom set() function to improve security.
Comment 5 Chad H. 2009-03-19 17:41:50 UTC
How would this integrate with code? Does SpecialPreferences just call the template in its execute() method, or what? By itself it does nothing.
Comment 6 Tyler Romeo 2009-03-20 01:28:52 UTC
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.
Comment 7 Andrew Garrett 2009-04-27 06:15:34 UTC
Fixed in r49790.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links