Merge "Watchlist: changed "all" for the max number of days available"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 29 Sep 2014 14:31:49 +0000 (14:31 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 29 Sep 2014 14:31:49 +0000 (14:31 +0000)
includes/DefaultSettings.php
includes/specials/SpecialWatchlist.php
languages/i18n/en.json
languages/i18n/qqq.json

index 28349e9..ea2242f 100644 (file)
@@ -5731,9 +5731,9 @@ $wgGitRepositoryViewers = array(
 /**
  * Recentchanges items are periodically purged; entries older than this many
  * seconds will go.
- * Default: 13 weeks = about three months
+ * Default: 90 days = about three months
  */
-$wgRCMaxAge = 13 * 7 * 24 * 3600;
+$wgRCMaxAge = 90 * 24 * 3600;
 
 /**
  * Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers
index 8f2f86b..7becfaa 100644 (file)
@@ -562,12 +562,10 @@ class SpecialWatchlist extends ChangesListSpecialPage {
 
        protected function daysLink( $d, $options = array() ) {
                $options['days'] = $d;
-               $message = $d ? $this->getLanguage()->formatNum( $d )
-                       : $this->msg( 'watchlistall2' )->escaped();
 
                return Linker::linkKnown(
                        $this->getPageTitle(),
-                       $message,
+                       $this->getLanguage()->formatNum( $d ),
                        array(),
                        $options
                );
@@ -581,8 +579,11 @@ class SpecialWatchlist extends ChangesListSpecialPage {
         * @return string
         */
        protected function cutoffLinks( $days, $options = array() ) {
+               global $wgRCMaxAge;
+               $watchlistMaxDays = ceil( $wgRCMaxAge / ( 3600 * 24 ) );
+
                $hours = array( 1, 2, 6, 12 );
-               $days = array( 1, 3, 7 );
+               $days = array( 1, 3, 7, $watchlistMaxDays );
                $i = 0;
                foreach ( $hours as $h ) {
                        $hours[$i++] = $this->hoursLink( $h, $options );
@@ -594,8 +595,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
 
                return $this->msg( 'wlshowlast' )->rawParams(
                        $this->getLanguage()->pipeList( $hours ),
-                       $this->getLanguage()->pipeList( $days ),
-                       $this->daysLink( 0, $options ) )->parse();
+                       $this->getLanguage()->pipeList( $days ) )->parse();
        }
 
        /**
index 7a1d2f5..fc47178 100644 (file)
        "wlheader-enotif": "Email notification is enabled.",
        "wlheader-showupdated": "Pages that have been changed since you last visited them are shown in <strong>bold</strong>.",
        "wlnote": "Below {{PLURAL:$1|is the last change|are the last <strong>$1</strong> changes}} in the last {{PLURAL:$2|hour|<strong>$2</strong> hours}}, as of $3, $4.",
-       "wlshowlast": "Show last $1 hours $2 days $3",
+       "wlshowlast": "Show last $1 hours $2 days",
        "watchlist-options": "Watchlist options",
        "watching": "Watching...",
        "unwatching": "Unwatching...",
        "exif-urgency-low": "Low ($1)",
        "exif-urgency-high": "High ($1)",
        "exif-urgency-other": "User-defined priority ($1)",
-       "watchlistall2": "all",
        "namespacesall": "all",
        "monthsall": "all",
        "confirmemail": "Confirm email address",
index 6e8d209..1d23265 100644 (file)
        "wlheader-enotif": "Message at the top of [[Special:Watchlist]], after {{msg-mw|watchlist-details}}. Has to be a full sentence.\n\nSee also:\n* {{msg-mw|Watchlist-options|fieldset}}\n* {{msg-mw|enotif reset|Submit button text}}",
        "wlheader-showupdated": "Message at the top of [[Special:Watchlist]], after {{msg-mw|watchlist-details}}. Has to be a full sentence.",
        "wlnote": "Used on [[Special:Watchlist]] when a maximum number of hours or days is specified.\n\nParameters:\n* $1 - the number of changes shown\n* $2 - the number of hours for which the changes are shown\n* $3 - a date alone\n* $4 - a time alone",
-       "wlshowlast": "Appears on [[Special:Watchlist]]. Parameters:\n* $1 - a choice of different numbers of hours (\"1 | 2 | 6 | 12\")\n* $2 - a choice of different numbers of days (\"1 | 3 | 7\")\n* $3 - {{msg-mw|watchlistall2}}\nClicking on your choice changes the list of changes you see (without changing the default in my preferences).",
+       "wlshowlast": "Appears on [[Special:Watchlist]]. Parameters:\n* $1 - a choice of different numbers of hours (\"1 | 2 | 6 | 12\")\n* $2 - a choice of different numbers of days (\"1 | 3 | 7\")\nClicking on your choice changes the list of changes you see (without changing the default in my preferences).",
        "watchlist-options": "Legend of the fieldset of [[Special:Watchlist]]\n\nSee also:\n* {{msg-mw|Watchlist-details|watchlist header}}\n* {{msg-mw|Wlheader-enotif|watchlist header}}\n* {{msg-mw|enotif reset|Submit button text}}",
        "watching": "Text displayed when clicked on the watch tab: {{msg-mw|Watch}}. It means the wiki is adding that page to your watchlist.",
        "unwatching": "Text displayed when clicked on the unwatch tab: {{msg-mw|Unwatch}}. It means the wiki is removing that page from your watchlist.",
        "exif-urgency-low": "Parameters:\n* $1 - numeric priority (6-8 for low)\n{{Related|Exif-urgency}}",
        "exif-urgency-high": "Parameters:\n* $1 - numeric priority (1-4 for high)\n{{Related|Exif-urgency}}",
        "exif-urgency-other": "Parameters:\n* $1 - numeric priority. Most specs define 0 and 9 to either be reserved or not allowed. However the exiftool documentation defines 0 to be reserved and 9 to be user-defined priority.\n{{Related|Exif-urgency}}",
-       "watchlistall2": "Appears on [[Special:Watchlist]].\n\nUsed as <code>$3</code> in the message {{msg-mw|Wlshowlast}}.\n{{Identical|All}}",
        "namespacesall": "In special page [[Special:WhatLinksHere]]. Drop-down box option for namespace.\n\n{{Identical|All}}",
        "monthsall": "Used in a drop-down box on [[Special:Contributions]] as an option for \"all months\". See also {{msg-mw|Month}}.\n{{Identical|All}}",
        "confirmemail": "Title of [[Special:ConfirmEmail]] page.",