From: Aaron Schulz Date: Tue, 17 Feb 2015 18:33:01 +0000 (-0800) Subject: Made ActiveUsers work a bit better on small wikis X-Git-Tag: 1.31.0-rc.0~12369^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=8a4eae05cb739f335549986ecb7248477c867d27;p=lhc%2Fweb%2Fwiklou.git Made ActiveUsers work a bit better on small wikis bug: T89027 Change-Id: If0fc4b51b89170e000cf42bdc3e782e42323a440 --- diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index 66f1f0379d..a031dad747 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -311,7 +311,10 @@ class SpecialActiveUsers extends SpecialPage { if ( !wfReadOnly() ) { if ( !$cTime || ( time() - wfTimestamp( TS_UNIX, $cTime ) ) > $period ) { $dbw = wfGetDB( DB_MASTER ); - if ( $dbw->estimateRowCount( 'recentchanges' ) <= 10000 ) { + $cond = $cTime + ? array( 'rc_timestamp > ' . $dbw->addQuotes( $cTime ) ) + : array(); + if ( $dbw->estimateRowCount( 'recentchanges', '*', $cond ) <= 10000 ) { $window = $days * 86400; // small wiki } else { $window = $period * 2;