Umherirrender has uploaded a new change for review.
https://gerrit.wikimedia.org/r/184214
Change subject: Skip cache hint about 0 seconds on Special:ActiveUsers
......................................................................
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
---
M includes/specials/SpecialActiveusers.php
1 file changed, 5 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/14/184214/1
diff --git a/includes/specials/SpecialActiveusers.php
b/includes/specials/SpecialActiveusers.php
index 0caf6b4..66f1f03 100644
--- a/includes/specials/SpecialActiveusers.php
+++ b/includes/specials/SpecialActiveusers.php
@@ -269,9 +269,11 @@
// 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 );
--
To view, visit https://gerrit.wikimedia.org/r/184214
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I46f80c7cdc083b997794fb9398887e2ef0088684
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits