Page MenuHomePhabricator

User preference for no email notification for minor edits does not work
Closed, ResolvedPublic

Description

Author: David.Biesack

Description:
We've enabled email notification on our intranet wiki. In my preferences, I have
"Send me an email also for minor edits of pages" disabled but our MediaWiki
1.5.6 system is still sending me email when someone makes a minor edit. The page
history shows the edit is a minor edit and the email contains

Editor's summary: (comment...)  This is a minor edit

UserMailer.php contains

...
&& (!$minorEdit || ($wgEnotifMinorEdits &&

$watchingUser->getOption('enotifminoredits') ) )

which looks correct.

I can add

$wgEnotifMinorEdits = false; # UPO; false: "minor edits" on pages do not

trigger notification mails.

to LocalSettings.php but I'd rather give users the option to set this themselves.

I'm using the standard MW 1.5.6; I did not download/install ENotif separately.


Version: 1.6.x
Severity: normal

Details

Reference
bz4918

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:05 PM
bzimport set Reference to bz4918.

The logical expression in MediaWiki is incorrect, you need to add a pair of
parentheses marked as *(* and *)*

MediaWiki ( 2 parentheses missing)
http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/includes/UserMailer.php?annotate=1.38
:

if *(* ( ( $enotifwatchlistpage &&
$watchingUser->getOption('enotifwatchlistpages') ) ||

	  	  	  ( $enotifusertalkpage &&

$watchingUser->getOption('enotifusertalkpages') ) *)*

	  	  	  && (!$minorEdit || ($wgEnotifMinorEdits &&

$watchingUser->getOption('enotifminoredits') ) )

	  	  	  && ($watchingUser->isEmailConfirmed() ) ) {

See also EnotifWiki
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/enotifwiki/enotifwiki/includes/UserMailer.php?annotate=1.10
for the correct part.

a regular patch will not follow, because this is a trivial change.

Please test 1.6 from CVS HEAD; 1.5 is old and lots of email notification bits are broken in it.

(In reply to comment #3)

Please test 1.6 from CVS HEAD; 1.5 is old and lots of email notification bits

are broken in it.

Brion, the small amendment is also needed in your MediaWiki HEAD, where I took
the code sniplet from.

sacolcor wrote:

Pinging the radar on this; it's a trivial fix for an obvious bug, with a patch provided and review requested, and no action on it for over a year.

robchur wrote:

Need an actual patch file; patches in comments of this nature are a bit awkward to review.

sacolcor wrote:

Patch as described in prior comments

Attached:

Applied w/ formatting adjustments in r25974, but I can't actually reproduce the bug.

I seem to get the expected behavior both with and without the patch.