Page MenuHomePhabricator

Enotif Reset Nofication Flags does not work
Closed, ResolvedPublic

Description

Author: dieter.menne

Description:
In SpecialWatchlist, clearAllNotifcations() has no arguments, so it always
returns immediately.
The solution below seems to work:

if( $wgRequest->getVal( 'reset' ) == 'all' ) {

		$wgUser->clearAllNotifications($uid); // Menne, added $uid

}


Version: 1.5.x
Severity: normal
URL: http://meta.wikipedia.org/Enotif

Details

Reference
bz1363
ReferenceSource BranchDest BranchAuthorTitle
repos/cloud/toolforge/maintain-harbor!8add_retention_policymasterdcaroAdd retention policy to the projects
toolforge-repos/wlh!2url-pagination-1mainegardnerrouter: Expose current page as URL param
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:11 PM
bzimport set Reference to bz1363.

(In reply to comment #0)

In SpecialWatchlist, clearAllNotifcations() has no arguments, so it always
returns immediately.
The solution below seems to work:

if( $wgRequest->getVal( 'reset' ) == 'all' ) {

		$wgUser->clearAllNotifications($uid); // Menne, added $uid

}

I confirm Dieter's observation.

Please can someone of the core developers change this in CVS HEAD ? Thanks; I do
not have CVS access rights.

I checked today's CVS HEAD, it works fine.

Tom aka Wikinaut

  • for Enotif

dieter.menne wrote:

I don't really recommend my fix from a design point of view, it only was a quick fix. Passing
the UID to a class that "knows" the user is no clean design. Better change the definition of
clearAllNotification to taking no parameters and extracting the uid from itself.

This is probably what Brion had in mind when he (not Tom) remove the parameter, but it was not
followed up by changes in the user class.

(In reply to comment #2)

I don't really recommend my fix from a design point of view, it only was a

quick fix. Passing

the UID to a class that "knows" the user is no clean design. Better change the

definition of

clearAllNotification to taking no parameters and extracting the uid from itself.

This is probably what Brion had in mind when he (not Tom) remove the

parameter, but it was not

followed up by changes in the user class.

Yes, this should also be adapted accordingly.
Tom

  • for ENotif