Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/103239
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, 5 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/39/103239/1
diff --git a/includes/specials/SpecialWatchlist.php
b/includes/specials/SpecialWatchlist.php
index da25182..58e79172 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 );
@@ -406,7 +405,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( /* unused
*/ 0, 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 a4c2056..c25ac70 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -2957,7 +2957,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
'''$1''' changes}} in the last {{PLURAL:$2|hour|'''$2''' hours}}, as of $3,
$4.",
+'wlnote2' => "Below are the changes in the last
{{PLURAL:$2|hour|'''$2''' hours}}, as of $3, $4.",
'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 1e2bc6c..5bde780 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -5393,10 +5393,10 @@
* {{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
+* $1 - \'\'unused\'\'
* $2 - the number of hours for which the changes are shown
* $3 - a date alone
* $4 - a time alone',
diff --git a/maintenance/language/messages.inc
b/maintenance/language/messages.inc
index dab977e..c585cc8 100644
--- a/maintenance/language/messages.inc
+++ b/maintenance/language/messages.inc
@@ -2005,7 +2005,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: newchange
Gerrit-Change-Id: Iada3a93762dd25fdaf35fb707304abc40bd4a5b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits