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

Change subject: SpecialWatchlist: Display 'wlnote' message even when showing 
"all" days
......................................................................


SpecialWatchlist: Display 'wlnote' message even when showing "all" days

Change-Id: Ib22ecd53c7765125cec08a39cecd4d4098d40b9a
---
M includes/specials/SpecialWatchlist.php
1 file changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 7ab6578..20dde01 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -422,13 +422,15 @@
                $this->setTopText( $opts );
 
                $lang = $this->getLanguage();
-               $wlInfo = '';
                if ( $opts['days'] > 0 ) {
-                       $timestamp = wfTimestampNow();
-                       $wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, 
round( $opts['days'] * 24 ) )->params(
-                               $lang->userDate( $timestamp, $user ), 
$lang->userTime( $timestamp, $user )
-                       )->parse() . "<br />\n";
+                       $days = $opts['days'];
+               } else {
+                       $days = $this->getConfig()->get( 'RCMaxAge' ) / ( 3600 
* 24 );
                }
+               $timestamp = wfTimestampNow();
+               $wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, round( 
$days * 24 ) )->params(
+                       $lang->userDate( $timestamp, $user ), $lang->userTime( 
$timestamp, $user )
+               )->parse() . "<br />\n";
 
                $nondefaults = $opts->getChangedValues();
                $cutofflinks = $this->msg( 'wlshowtime' ) . ' ' . 
$this->cutoffselector( $opts );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib22ecd53c7765125cec08a39cecd4d4098d40b9a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to