From: Mr. E23 Date: Wed, 28 Jan 2004 14:41:20 +0000 (+0000) Subject: Cutoff on midnight always, making successive queries identical. This means it can... X-Git-Tag: 1.3.0beta1~1084 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=7d43968968ed80c755320996ba60cd667b859b38;p=lhc%2Fweb%2Fwiklou.git Cutoff on midnight always, making successive queries identical. This means it can take advantage of the mysql query cache. --- diff --git a/includes/SpecialRecentchanges.php b/includes/SpecialRecentchanges.php index 986c389f75..001f936f0d 100644 --- a/includes/SpecialRecentchanges.php +++ b/includes/SpecialRecentchanges.php @@ -41,7 +41,9 @@ function wfSpecialRecentchanges( $par ) $days = (int)$days; list( $limit, $offset ) = wfCheckLimits( 100, "rclimit" ); $now = wfTimestampNow(); - $cutoff = wfUnix2Timestamp( time() - ( $days * 86400 ) ); + $cutoff_unixtime = time() - ( $days * 86400 ); + $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime % 86400); + $cutoff = wfUnix2Timestamp( $cutoff_unixtime ); if(preg_match('/^[0-9]{14}$/', $from) and $from > $cutoff) { $cutoff = $from; } else {