SpecialWatchlist: Display 'wlnote' message even when showing "all" days
authorBartosz Dziewoński <matma.rex@gmail.com>
Sun, 24 Jan 2016 16:02:59 +0000 (17:02 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sun, 24 Jan 2016 16:02:59 +0000 (17:02 +0100)
Change-Id: Ib22ecd53c7765125cec08a39cecd4d4098d40b9a

includes/specials/SpecialWatchlist.php

index 7ab6578..20dde01 100644 (file)
@@ -422,13 +422,15 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                $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 );