Legoktm has uploaded a new change for review.

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


Change subject: Split user rights changes into their own category
......................................................................

Split user rights changes into their own category

This will allow users to disable them if they wish to.
By default, both web and email are enabled for all users, which
is the current default.

This also fixes a bug in the EventLogging portion where user rights
changes would be logged with a user id of -1, instead of the
actual user.

Bug: 55337
Change-Id: I026b9392b085e295fbcd375095c9aed682fc29a2
---
M Echo.i18n.php
M Echo.php
2 files changed, 18 insertions(+), 1 deletion(-)


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

diff --git a/Echo.i18n.php b/Echo.i18n.php
index bb7b1af..8ff8c8c 100644
--- a/Echo.i18n.php
+++ b/Echo.i18n.php
@@ -42,12 +42,14 @@
        'echo-category-title-mention' => '{{PLURAL:$1|Mention|Mentions}}',
        'echo-category-title-other' => '{{PLURAL:$1|Other}}',
        'echo-category-title-system' => '{{PLURAL:$1|System}}',
+       'echo-category-title-user-rights' => '{{PLURAL:$1|User rights 
changes}}',
 
        // Category tooltips
        'echo-pref-tooltip-edit-user-talk' => 'Notify me when someone posts a 
message or replies on my talk page.',
        'echo-pref-tooltip-article-linked' => 'Notify me when someone links to 
a page I created from an article page.',
        'echo-pref-tooltip-reverted' => 'Notify me when someone reverts an edit 
I made, by using the undo or rollback tool.',
        'echo-pref-tooltip-mention' => 'Notify me when someone links to my user 
page from any talk page.',
+       'echo-pref-tooltip-user-rights' => 'Notify me when someone changes my 
user rights.',
 
        // Errors
        'echo-no-agent' => '[Nobody]',
@@ -267,10 +269,20 @@
 Parameters:
 * $1 - number of messages, for PLURAL support
 {{Related|Echo-category-title}}',
+       'echo-category-title-user-rights' => 'This is a short title for 
notification category.
+
+Used in a list of options under the heading {{msg-mw|Prefs-echosubscriptions}} 
in Special:Preferences. As far as I can see this always needs to be a plural 
for an unspecified number.
+
+It used to be used as <code>$1</code> in {{msg-mw|Echo-dismiss-message}}, but 
this message is no longer used, apparently.
+
+Parameters:
+* $1 - number of messages, for PLURAL support
+{{Related|Echo-category-title}}',
        'echo-pref-tooltip-edit-user-talk' => 'This is a short description of 
the edit-user-talk notification category.',
        'echo-pref-tooltip-article-linked' => 'This is a short description of 
the article-linked notification category',
        'echo-pref-tooltip-reverted' => 'This is a short description of the 
tooltip-reverted notification category',
        'echo-pref-tooltip-mention' => 'This is a short description of the 
mention notification category',
+       'echo-pref-tooltip-user-rights' => 'This is a short description of the 
user rights changes notification category',
        'echo-no-agent' => 'Shown in place of a username in a notification
        if the notification has no specified user.',
        'echo-no-title' => 'Shown in place of a page title in a notification if 
the notification has no specified page title.',
diff --git a/Echo.php b/Echo.php
index ced1f47..bc14522 100644
--- a/Echo.php
+++ b/Echo.php
@@ -352,6 +352,10 @@
                'priority' => 9,
                'no-dismiss' => array( 'all' ),
        ),
+       'user-rights' => array( // bug 55337
+               'priority' => 9,
+               'tooltip' => 'echo-pref-tooltip-user-rights',
+       ),
        'other' => array(
                'no-dismiss' => array( 'all' ),
        ),
@@ -508,7 +512,7 @@
        ),
        'user-rights' => array(
                'primary-link' => array( 'message' => 'echo-learn-more', 
'destination' => 'user-rights-list' ),
-               'category' => 'system',
+               'category' => 'user-rights',
                'group' => 'neutral',
                'formatter-class' => 'EchoUserRightsFormatter',
                'title-message' => 'notification-user-rights',
@@ -546,6 +550,7 @@
 
 // most settings default to web on, email off, but override these
 $wgDefaultUserOptions['echo-subscriptions-email-system'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-user-rights'] = true;
 $wgDefaultUserOptions['echo-subscriptions-web-article-linked'] = false;
 
 // Echo Configuration for EventLogging

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

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

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

Reply via email to