From 31f32f990eef7de94bd5a87000cf776b06168564 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Sun, 22 Dec 2013 15:53:13 +0100 Subject: [PATCH] No longer display the number of rows shown on Special:Watchlist My rationale for doing this is that passing this several functions down is awkward and arguably bad design. It's still a better rationale than the one used to add this in 2004, which was replacing another value to fix HTML injection bug (r4728). Change-Id: Iada3a93762dd25fdaf35fb707304abc40bd4a5b1 --- includes/specials/SpecialWatchlist.php | 3 +-- languages/messages/MessagesEn.php | 2 +- languages/messages/MessagesQqq.php | 9 ++++----- maintenance/language/messages.inc | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index c664e311fa..f19d2323b8 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -74,7 +74,6 @@ class SpecialWatchlist extends ChangesListSpecialPage { // Fetch results, prepare a batch link existence check query $conds = $this->buildMainQueryConds( $opts ); $rows = $this->doMainQuery( $conds, $opts ); - $this->numRows = $rows->numRows(); // TODO kill me if ( $rows === false ) { $this->doHeader( $opts ); @@ -423,7 +422,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { $wlInfo = ''; if ( $opts['days'] > 0 ) { $timestamp = wfTimestampNow(); - $wlInfo = $this->msg( 'wlnote' )->numParams( $this->numRows, round( $opts['days'] * 24 ) )->params( + $wlInfo = $this->msg( 'wlnote2' )->numParams( round( $opts['days'] * 24 ) )->params( $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user ) )->parse() . "
\n"; } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 3e009e8de9..9e68ef2c15 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2972,7 +2972,7 @@ Future changes to this page and its associated talk page will be listed there.', 'watchmethod-list' => 'checking watched pages for recent edits', 'watchlistcontains' => 'Your watchlist contains $1 {{PLURAL:$1|page|pages}}.', 'iteminvalidname' => 'Problem with item "$1", invalid name...', -'wlnote' => "Below {{PLURAL:$1|is the last change|are the last $1 changes}} in the last {{PLURAL:$2|hour|$2 hours}}, as of $3, $4.", +'wlnote2' => "Below are the changes in the last {{PLURAL:$1|hour|$1 hours}}, as of $2, $3.", 'wlshowlast' => 'Show last $1 hours $2 days $3', 'watchlist-options' => 'Watchlist options', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index ebb470f506..7eb6171420 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -5462,13 +5462,12 @@ See also: * {{msg-mw|Watchlist-details}}', 'iteminvalidname' => 'Parameters: * $1 - item name', -'wlnote' => 'Used on [[Special:Watchlist]] when a maximum number of hours or days is specified. +'wlnote2' => 'Used on [[Special:Watchlist]] when a maximum number of hours or days is specified. Parameters: -* $1 - the number of changes shown -* $2 - the number of hours for which the changes are shown -* $3 - a date alone -* $4 - a time alone', +* $1 - the number of hours for which the changes are shown +* $2 - a date alone +* $3 - a time alone', 'wlshowlast' => 'Appears on [[Special:Watchlist]]. Parameters: * $1 - a choice of different numbers of hours ("1 | 2 | 6 | 12") * $2 - a choice of different numbers of days ("1 | 3 | 7") diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index d698552274..2162d2449a 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2011,7 +2011,7 @@ $wgMessageStructure = array( 'watchmethod-list', 'watchlistcontains', 'iteminvalidname', - 'wlnote', + 'wlnote2', 'wlshowlast', 'watchlist-options', ), -- 2.20.1