Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.settings.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | $wgGroupPermissions['bot' ]['semanticwatchgroups'] = false; |
35 | 35 | $wgGroupPermissions['sysop' ]['semanticwatchgroups'] = true; |
36 | 36 | |
37 | | -# Enable email notification or not? |
| 37 | +# Enable email notification by default or not? |
38 | 38 | $egSWLEnableEmailNotify = true; |
39 | 39 | |
40 | 40 | # 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 @@ |
57 | 57 | foreach ( $userIDs as $userID ) { |
58 | 58 | $user = User::newFromId( $userID ); |
59 | 59 | |
60 | | - if ( Sanitizer::validateEmail( $user->getEmail() ) ) { |
| 60 | + if ( $user->getOption( 'swl_email', false ) && Sanitizer::validateEmail( $user->getEmail() ) ) { |
61 | 61 | $lastNotify = $user->getOption( 'swl_last_notify' ); |
62 | 62 | $lastWatch = $user->getOption( 'swl_last_watch' ); |
63 | 63 | |
— | — | @@ -93,6 +93,7 @@ |
94 | 94 | 'type' => 'toggle', |
95 | 95 | 'label-message' => 'swl-prefs-emailnofity', |
96 | 96 | 'section' => 'swl/swlnotification', |
| 97 | + 'default' => $GLOBALS['egSWLEnableEmailNotify'] |
97 | 98 | ); |
98 | 99 | |
99 | 100 | foreach ( $groups as /* SWLGroup */ $group ) { |