r107169 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107168‎ | r107169 | r107170 >
Date:18:55, 23 December 2011
Author:bsitu
Status:ok
Tags:
Comment:
Bugzilla bug11612 - Make watchlist max days preference setting reflect the max days in Recent Changes
Modified paths:
  • /trunk/phase3/includes/Preferences.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Preferences.php
@@ -849,15 +849,18 @@
850850 * @param $defaultPreferences
851851 */
852852 static function watchlistPreferences( $user, IContextSource $context, &$defaultPreferences ) {
853 - global $wgUseRCPatrol, $wgEnableAPI;
 853+ global $wgUseRCPatrol, $wgEnableAPI, $wgRCMaxAge;
854854
 855+ $watchlistdaysMax = ceil( $wgRCMaxAge / ( 3600 * 24 ) );
 856+
855857 ## Watchlist #####################################
856858 $defaultPreferences['watchlistdays'] = array(
857859 'type' => 'float',
858860 'min' => 0,
859 - 'max' => 7,
 861+ 'max' => $watchlistdaysMax,
860862 'section' => 'watchlist/displaywatchlist',
861 - 'help' => $context->msg( 'prefs-watchlist-days-max' )->escaped(),
 863+ 'help' => $context->msg( 'prefs-watchlist-days-max' )->numParams(
 864+ $watchlistdaysMax )->text(),
862865 'label-message' => 'prefs-watchlist-days',
863866 );
864867 $defaultPreferences['wllimit'] = array(
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1767,7 +1767,7 @@
17681768 'prefs-rc' => 'Recent changes',
17691769 'prefs-watchlist' => 'Watchlist',
17701770 'prefs-watchlist-days' => 'Days to show in watchlist:',
1771 -'prefs-watchlist-days-max' => 'Maximum 7 days',
 1771+'prefs-watchlist-days-max' => 'Maximum $1 {{PLURAL:$1|day|days}}',
17721772 'prefs-watchlist-edits' => 'Maximum number of changes to show in expanded watchlist:',
17731773 'prefs-watchlist-edits-max' => 'Maximum number: 1000',
17741774 'prefs-watchlist-token' => 'Watchlist token:',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r26591(bug 11612) Days to show in recent changes cannot be larger than 7catrope12:31, 11 October 2007

Status & tagging log