Bsitu has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/59024


Change subject: Remove unused user preference
......................................................................

Remove unused user preference

Change-Id: Ib18d992b34630be2137e287cf2a5ce2430a7cbaa
---
M Echo.i18n.php
M Echo.php
M Hooks.php
3 files changed, 6 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/24/59024/1

diff --git a/Echo.i18n.php b/Echo.i18n.php
index 7cd8821..4566686 100644
--- a/Echo.i18n.php
+++ b/Echo.i18n.php
@@ -22,7 +22,6 @@
        'echo-pref-email-frequency-immediately' => 'Individual notifications as 
they come in',
        'echo-pref-email-frequency-daily' => 'A daily summary of notifications',
        'echo-pref-email-frequency-weekly' => 'A weekly summary of 
notifications',
-       'echo-pref-notify-hide-link' => 'Hide the link and badge for 
notifications in my toolbar',
 
        // Dismiss interface
        'echo-dismiss-button' => 'Dismiss',
diff --git a/Echo.php b/Echo.php
index ec22895..b999b92 100644
--- a/Echo.php
+++ b/Echo.php
@@ -392,9 +392,6 @@
        ),
 );
 
-// Enable notifications for all logged in users by default
-$wgDefaultUserOptions['echo-notify-link'] = 'true';
-
 // By default, send emails for each notification as they come in
 $wgDefaultUserOptions['echo-email-frequency'] = EchoHooks::EMAIL_IMMEDIATELY;
 
diff --git a/Hooks.php b/Hooks.php
index a953f63..b04e9ea 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -548,7 +548,7 @@
         */
        static function beforePageDisplay( $out, $skin ) {
                $user = $out->getUser();
-               if ( $user->isLoggedIn() && !$user->getOption( 
'echo-notify-hide-link' ) ) {
+               if ( $user->isLoggedIn() ) {
                        // Load the module for the Notifications flyout
                        $out->addModules( array( 'ext.echo.overlay' ) );
                }
@@ -566,7 +566,7 @@
        static function onPersonalUrls( &$personal_urls, &$title ) {
                global $wgUser, $wgEchoShowFullNotificationsLink;
                // Add a "My notifications" item to personal URLs
-               if ( $wgUser->isAnon() || $wgUser->getOption( 
'echo-notify-hide-link' ) ) {
+               if ( $wgUser->isAnon() ) {
                        return true;
                }
 
@@ -657,11 +657,10 @@
         * @return bool
         */
        static function abortNewTalkNotification( $page ) {
-               global $wgUser, $wgEchoNotifications;
-               // If the user has the notifications flyout turned on and is 
receiving
-               // notifications for talk page messages, disable the 
yellow-bar-style notice.
-               if ( !$wgUser->getOption( 'echo-notify-hide-link' )
-                       && isset( $wgEchoNotifications['edit-user-talk'] ) )
+               global $wgEchoNotifications;
+               // If the user is receiving notifications for talk page 
messages,
+               // disable the yellow-bar-style notice.
+               if ( isset( $wgEchoNotifications['edit-user-talk'] ) )
                {
                        return false;
                } else {

-- 
To view, visit https://gerrit.wikimedia.org/r/59024
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib18d992b34630be2137e287cf2a5ce2430a7cbaa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to