jenkins-bot has submitted this change and it was merged.

Change subject: No longer display the number of rows shown on Special:Watchlist
......................................................................


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
---
M includes/specials/SpecialWatchlist.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messages.inc
4 files changed, 7 insertions(+), 9 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index c664e31..f19d232 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -74,7 +74,6 @@
                // 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 @@
                $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() . "<br />\n";
                }
 
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 3e009e8..9e68ef2 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -2972,7 +2972,7 @@
 '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 
<strong>$1</strong> changes}} in the last {{PLURAL:$2|hour|<strong>$2</strong> 
hours}}, as of $3, $4.",
+'wlnote2'              => "Below are the changes in the last 
{{PLURAL:$1|hour|<strong>$1</strong> 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 ebb470f..7eb6171 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -5462,13 +5462,12 @@
 * {{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 d698552..2162d24 100644
--- a/maintenance/language/messages.inc
+++ b/maintenance/language/messages.inc
@@ -2011,7 +2011,7 @@
                'watchmethod-list',
                'watchlistcontains',
                'iteminvalidname',
-               'wlnote',
+               'wlnote2',
                'wlshowlast',
                'watchlist-options',
        ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iada3a93762dd25fdaf35fb707304abc40bd4a5b1
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to