r88482 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88481‎ | r88482 | r88483 >
Date:19:59, 20 May 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
hold into account the email preference
Modified paths:
  • /trunk/extensions/SemanticWatchlist/SemanticWatchlist.hooks.php (modified) (history)
  • /trunk/extensions/SemanticWatchlist/SemanticWatchlist.settings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.settings.php
@@ -33,7 +33,7 @@
3434 $wgGroupPermissions['bot' ]['semanticwatchgroups'] = false;
3535 $wgGroupPermissions['sysop' ]['semanticwatchgroups'] = true;
3636
37 -# Enable email notification or not?
 37+# Enable email notification by default or not?
3838 $egSWLEnableEmailNotify = true;
3939
4040 # Send an email for every change (as opossed to a "something changed email" for the first $egSWLMaxMails changes)?
Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.hooks.php
@@ -56,7 +56,7 @@
5757 foreach ( $userIDs as $userID ) {
5858 $user = User::newFromId( $userID );
5959
60 - if ( Sanitizer::validateEmail( $user->getEmail() ) ) {
 60+ if ( $user->getOption( 'swl_email', false ) && Sanitizer::validateEmail( $user->getEmail() ) ) {
6161 $lastNotify = $user->getOption( 'swl_last_notify' );
6262 $lastWatch = $user->getOption( 'swl_last_watch' );
6363
@@ -93,6 +93,7 @@
9494 'type' => 'toggle',
9595 'label-message' => 'swl-prefs-emailnofity',
9696 'section' => 'swl/swlnotification',
 97+ 'default' => $GLOBALS['egSWLEnableEmailNotify']
9798 );
9899
99100 foreach ( $groups as /* SWLGroup */ $group ) {

Status & tagging log