No longer display the number of rows shown on Special:Watchlist
authorBartosz Dziewoński <matma.rex@gmail.com>
Sun, 22 Dec 2013 14:53:13 +0000 (15:53 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sun, 26 Jan 2014 19:51:38 +0000 (20:51 +0100)
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
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index c664e31..f19d232 100644 (file)
@@ -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() . "<br />\n";
                }
 
index 3e009e8..9e68ef2 100644 (file)
@@ -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 <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',
 
index ebb470f..7eb6171 100644 (file)
@@ -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")
index d698552..2162d24 100644 (file)
@@ -2011,7 +2011,7 @@ $wgMessageStructure = array(
                'watchmethod-list',
                'watchlistcontains',
                'iteminvalidname',
-               'wlnote',
+               'wlnote2',
                'wlshowlast',
                'watchlist-options',
        ),