diff --git a/includes/EchoHooks.php b/includes/EchoHooks.php index 17c98d510..a478810ee 100644 --- a/includes/EchoHooks.php +++ b/includes/EchoHooks.php @@ -23,7 +23,7 @@ class EchoHooks implements RecentChange_saveHook { * @param array &$defaults */ public static function onUserGetDefaultOptions( array &$defaults ) { - global $wgAllowHTMLEmail, $wgEchoNotificationCategories, $wgEchoEnablePush; + global $wgAllowHTMLEmail, $wgEchoNotificationCategories, $wgEchoEnablePush, $wgEchoCrossWikiNotifications; if ( $wgAllowHTMLEmail ) { $defaults['echo-email-format'] = 'html'; /*EchoHooks::EMAIL_FORMAT_HTML*/ @@ -31,6 +31,10 @@ class EchoHooks implements RecentChange_saveHook { $defaults['echo-email-format'] = 'plain-text'; /*EchoHooks::EMAIL_FORMAT_PLAIN_TEXT*/ } + if ( $wgEchoCrossWikiNotifications ) { + $defaults['echo-cross-wiki-notifications'] = false; + } + $presets = [ // Set all of the events to notify by web but not email by default // (won't affect events that don't email) @@ -85,6 +89,13 @@ class EchoHooks implements RecentChange_saveHook { ?? $presets['default']['push']; } } + + foreach ( self::getVirtualUserOptions() as $echoPref => $mwPref ) { + // Use the existing core option's default for the Echo option's default + if ( isset( $defaults[ $mwPref ] ) ) { + $defaults[ $echoPref ] = $defaults[ $mwPref ]; + } + } } /**