From 975646b51469ce481fd775807382e822464894ad Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 11 Jan 2015 11:39:20 +0100 Subject: [PATCH] Skip cache hint about 0 seconds on Special:ActiveUsers When the data on Special:ActiveUsers are up to date there is no need to give a hint, seeing data from cache "which can be up to 0 seconds". Change-Id: I46f80c7cdc083b997794fb9398887e2ef0088684 --- includes/specials/SpecialActiveusers.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index 0caf6b4a6f..66f1f0379d 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -269,9 +269,11 @@ class SpecialActiveUsers extends SpecialPage { // Occasionally merge in new updates $seconds = min( self::mergeActiveUsers( 300, $days ), $days * 86400 ); - // Mention the level of staleness - $out->addWikiMsg( 'cachedspecial-viewing-cached-ttl', - $this->getLanguage()->formatDuration( $seconds ) ); + if ( $seconds > 0 ) { + // Mention the level of staleness + $out->addWikiMsg( 'cachedspecial-viewing-cached-ttl', + $this->getLanguage()->formatDuration( $seconds ) ); + } $up = new ActiveUsersPager( $this->getContext(), null, $par ); -- 2.20.1