Last modified: 2010-05-15 15:51:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 10543 - Add 'UserPreferencesChanged' hook - good for logging.
Add 'UserPreferencesChanged' hook - good for logging.
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
1.10.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-11 17:20 UTC by Jean-Lou Dupont
Modified: 2010-05-15 15:51 UTC (History)
2 users (show)

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


Attachments

Description Jean-Lou Dupont 2007-07-11 17:20:15 UTC
Would it be possible to add a hook in 'SpecialPreferences.php' to trap changes in user preferences?
[[mw:User:Jldupont]]
Comment 1 Rob Church 2007-07-24 08:23:39 UTC
What hook parameters?
Comment 2 Jean-Lou Dupont 2007-07-24 12:36:56 UTC
I would suggest something along the following lines:

<code>wfRunHooks( 'UserSettingsChanging', array( $this, $wgUser ) );</code> at the ~ top of 'SpecialPreferences::savePreferences'; this way, the event handler function can have access to the 'before' and 'changed' parameters.

Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-24 18:32:40 UTC
I don't think there's much point in passing a global to a hook.  It can, after all, just access it itself.
Comment 4 Jean-Lou Dupont 2007-07-24 18:38:19 UTC
(In reply to comment #3)
> I don't think there's much point in passing a global to a hook.  It can, after
> all, just access it itself.
> 

True, assuming this event will only be triggered at this one place, but what about other potential places? E.g. what about a 'Special Page' of some nature that allows modification to some other user's preferences?

Just a thought.
Comment 5 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-24 18:44:38 UTC
Okay, yeah, I agree with that.  Cut down global use where possible.
Comment 6 Chad H. 2008-09-18 20:51:15 UTC
The SavePreferences hook was added in 1.11 (sometime between this bug and 10 Sept 2007)

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


Navigation
Links