Last modified: 2007-09-20 19:55:58 UTC
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.
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.
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.
Need an actual patch file; patches in comments of this nature are a bit awkward to review.
Created attachment 4012 [details] Patch as described in prior comments
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.