From 8ea7e7b0f7fddebdf7b8a7a63f80ec3d38f60019 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 3 Oct 2006 01:46:16 +0000 Subject: [PATCH] Merged endless loop fix from stable --- lib/statslib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/statslib.php b/lib/statslib.php index 9963d7725d1..1c64226cd54 100644 --- a/lib/statslib.php +++ b/lib/statslib.php @@ -252,7 +252,7 @@ function stats_cron_weekly () { $weeks = 0; mtrace("starting at $timestart"); - while ($sunday >= $nextsunday) { + while ($sunday > $nextsunday && $timestart < $nextsunday) { $timesql = " (timeend > $timestart AND timeend < $nextsunday) "; begin_sql(); @@ -381,7 +381,7 @@ function stats_cron_monthly () { $months = 0; mtrace("starting from $timestart"); - while ($monthend >= $nextmonthend) { + while ($monthend > $nextmonthend && $timestart < $nextmonthend) { $timesql = " (timeend > $timestart AND timeend < $nextmonthend) "; begin_sql();