mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Merge "Unset user-to-user email option when user emails are disabled"
This commit is contained in:
commit
a2933f5c8b
|
@ -85,7 +85,8 @@ class EchoHooks implements RecentChange_saveHook {
|
||||||
public static function initEchoExtension() {
|
public static function initEchoExtension() {
|
||||||
global $wgEchoNotifications, $wgEchoNotificationCategories, $wgEchoNotificationIcons,
|
global $wgEchoNotifications, $wgEchoNotificationCategories, $wgEchoNotificationIcons,
|
||||||
$wgEchoMentionStatusNotifications, $wgAllowArticleReminderNotification, $wgAPIModules,
|
$wgEchoMentionStatusNotifications, $wgAllowArticleReminderNotification, $wgAPIModules,
|
||||||
$wgEchoWatchlistNotifications, $wgEchoSeenTimeCacheType, $wgMainStash;
|
$wgEchoWatchlistNotifications, $wgEchoSeenTimeCacheType, $wgMainStash, $wgEnableEmail,
|
||||||
|
$wgEnableUserEmail;
|
||||||
|
|
||||||
// allow extensions to define their own event
|
// allow extensions to define their own event
|
||||||
Hooks::run( 'BeforeCreateEchoEvent',
|
Hooks::run( 'BeforeCreateEchoEvent',
|
||||||
|
@ -109,6 +110,11 @@ class EchoHooks implements RecentChange_saveHook {
|
||||||
unset( $wgEchoNotificationCategories['minor-watchlist'] );
|
unset( $wgEchoNotificationCategories['minor-watchlist'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only allow user email notifications when enabled
|
||||||
|
if ( !$wgEnableEmail || !$wgEnableUserEmail ) {
|
||||||
|
unset( $wgEchoNotificationCategories['emailuser'] );
|
||||||
|
}
|
||||||
|
|
||||||
// Default $wgEchoSeenTimeCacheType to $wgMainStash
|
// Default $wgEchoSeenTimeCacheType to $wgMainStash
|
||||||
if ( $wgEchoSeenTimeCacheType === null ) {
|
if ( $wgEchoSeenTimeCacheType === null ) {
|
||||||
$wgEchoSeenTimeCacheType = $wgMainStash;
|
$wgEchoSeenTimeCacheType = $wgMainStash;
|
||||||
|
|
Loading…
Reference in a new issue