From 2356b509c72593217e14e024eae3bfa2ff8f0b20 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 18 Oct 2006 20:18:37 +0200 Subject: fix getRecents for multiple edits per second This fixes the getRecent function when multiple edits occured during the same second. darcs-hash:20061018181837-7ad00-a09b9b63a4bab86d142bfe1f8cf662b001bda075.gz --- inc/changelog.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/changelog.php') diff --git a/inc/changelog.php b/inc/changelog.php index 0c6557e46..5cb99f29b 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -106,19 +106,19 @@ function getRecents($first,$num,$ns='',$flags=0){ // read all recent changes. (kept short) $lines = file($conf['changelog']); + // handle lines for($i = count($lines)-1; $i >= 0; $i--){ $rec = _handleRecent($lines[$i], $ns, $flags); if($rec !== false) { if(--$first >= 0) continue; // skip first entries - $recent[$rec['date']] = $rec; + $recent[] = $rec; $count++; // break when we have enough entries if($count >= $num){ break; } } } - krsort($recent); return $recent; } -- cgit v1.2.3