diff --git a/Repositories/statistics/scripts/eprints-usage_src.php b/Repositories/statistics/scripts/eprints-usage_src.php index b787106..fc8ee99 100755 --- a/Repositories/statistics/scripts/eprints-usage_src.php +++ b/Repositories/statistics/scripts/eprints-usage_src.php @@ -199,20 +199,20 @@ $request_date = $when["year"]."-".$when["mon"]."-".$when["mday"]; $datetestB = strtotime($request_date); /* NJS 2006-04-25 - Changed date comparison to <= from < to avoid the problem - of counting multiple times downloads whose $request_date - == $lastproc. This only occurred if you ran this script - several times per day. For example, if you ran this + IMPORTANT: if you run this script more than once per day, + it will count multiple times downloads whose + $request_date == $lastproc. For example, if you ran this script five times per day, all the downloads that occurred during that day would be counted EVERY TIME this script ran, thus overinflating your stats by a factor of - up to five :( + up to five :( This happens because $lastproc has one day + as its base unit. If finer granularity for stats updates is desired, the solution would be to use the full timestamp rather than just the date. */ - if ($datetestB <= $datetestA) + if ($datetestB < $datetestA) continue; // NJS 2005-11-25 Added regexp for EPrints short URLs.