Glaisher has uploaded a new change for review.
https://gerrit.wikimedia.org/r/185996
Change subject: Add links to Special:EditWatchlist in Preferences' Watchlist tab
......................................................................
Add links to Special:EditWatchlist in Preferences' Watchlist tab
This adds a new "Edit watchlist" section to Watchlist tab with links
to Special:EditWatchlist, EditWatchlist/raw and EditWatchlist/clear.
Bug: T26632
Change-Id: Id31fba4f7aadaa3e427becece3837a8d00b7718f
---
M includes/Preferences.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 34 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/96/185996/1
diff --git a/includes/Preferences.php b/includes/Preferences.php
index 9e0a255..0f07c6b 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -919,6 +919,30 @@
$watchlistdaysMax = ceil( $config->get( 'RCMaxAge' ) / ( 3600 *
24 ) );
## Watchlist #####################################
+ if ( $user->isAllowed( 'editmywatchlist' ) ) {
+ $editWatchlistLinks = array();
+ $editWatchlistModes = array(
+ 'edit' => array( 'EditWatchlist', false ),
+ 'raw' => array( 'EditWatchlist', 'raw' ),
+ 'clear' => array( 'EditWatchlist', 'clear' ),
+ );
+ foreach ( $editWatchlistModes as $editWatchlistMode =>
$mode ) {
+ // Messages: prefs-editwatchlist-edit,
prefs-editwatchlist-raw, prefs-editwatchlist-clear
+ $editWatchlistLinks[] = Linker::linkKnown(
+ SpecialPage::getTitleFor( $mode[0],
$mode[1] ),
+ wfMessage(
"prefs-editwatchlist-{$editWatchlistMode}" )->parse()
+ );
+ }
+
+ $defaultPreferences['editwatchlist'] = array(
+ 'type' => 'info',
+ 'raw' => true,
+ 'default' => $context->getLanguage()->pipeList(
$editWatchlistLinks ),
+ 'label-message' => 'prefs-editwatchlist-label',
+ 'section' => 'watchlist/editwatchlist',
+ );
+ }
+
$defaultPreferences['watchlistdays'] = array(
'type' => 'float',
'min' => 0,
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 56a2ee4..e701137 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -932,6 +932,11 @@
"prefs-personal": "User profile",
"prefs-rc": "Recent changes",
"prefs-watchlist": "Watchlist",
+ "prefs-editwatchlist": "Edit watchlist",
+ "prefs-editwatchlist-label": "Edit entries on your watchlist:",
+ "prefs-editwatchlist-edit": "View and remove titles on your watchlist",
+ "prefs-editwatchlist-raw": "Edit raw watchlist",
+ "prefs-editwatchlist-clear": "Clear your watchlist",
"prefs-watchlist-days": "Days to show in watchlist:",
"prefs-watchlist-days-max": "Maximum $1 {{PLURAL:$1|day|days}}",
"prefs-watchlist-edits": "Maximum number of changes to show in expanded
watchlist:",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 14345bf..20fe0d6 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1101,6 +1101,11 @@
"prefs-watchlist-edits": "Used in [[Special:Preferences]], tab
\"Watchlist\".",
"prefs-watchlist-edits-max": "Shown as hint in [[Special:Preferences]],
tab \"Watchlist\"",
"prefs-watchlist-token": "Used in [[Special:Preferences]], tab
Watchlist.",
+ "prefs-editwatchlist": "Used in [[Special:Preferences]], tab
\"Watchlist\".",
+ "prefs-editwatchlist-label": "Used in [[Special:Preferences]], tab
\"Watchlist\".",
+ "prefs-editwatchlist-edit": "Used in [[Special:Preferences]], tab
\"Watchlist\". Link to [[Special:EditWatchlist]]\n\nSee also:\n*
{{msg-mw|prefs-editwatchlist-clear}}\n* {{msg-mw|prefs-editwatchlist-raw}}",
+ "prefs-editwatchlist-raw": "Used in [[Special:Preferences]], tab
\"Watchlist\". Link to [[Special:EditWatchlist/raw]].\n\nSee also:\n*
{{msg-mw|prefs-editwatchlist-edit}}\n*
{{msg-mw|prefs-editwatchlist-clear}}\n{{Identical|Edit raw watchlist}}",
+ "prefs-editwatchlist-clear": "Used in [[Special:Preferences]], tab
\"Watchlist\". Link to [[Special:EditWatchlist/clear]].\n\nSee also:\n*
{{msg-mw|prefs-editwatchlist-edit}}\n*
{{msg-mw|prefs-editwatchlist-raw}}\n{{Identical|Clear watchlist}}",
"prefs-misc": "Tab used on the [[Special:Preferences|user preferences]]
special page.",
"prefs-resetpass": "Button on user data tab in user preferences. When
you click the button you go to the special page
[[Special:ResetPass]].\n\n{{Identical|Change password}}",
"prefs-changeemail": "Link on [[Special:Preferences]] to
[[Special:ChangeEmail]].\n\nSee also:\n*
{{msg-mw|prefs-help-email-required|help}}\n*
{{msg-mw|prefs-help-email|help}}\n* {{msg-mw|prefs-help-email-others|help}}\n*
{{msg-mw|prefs-setemail|link title}}",
--
To view, visit https://gerrit.wikimedia.org/r/185996
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id31fba4f7aadaa3e427becece3837a8d00b7718f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits