From 4570e95445222c24c0c10019da508868ca2c2418 Mon Sep 17 00:00:00 2001
From: Tom N Harris <tnharris@whoopdedo.org>
Date: Tue, 16 Oct 2007 00:57:11 +0200
Subject: [PATCH] Fix border condition on recent change update

darcs-hash:20071015225711-6942e-4d540e23e3c2ab62e378b0b9bc3cb80041c79350.gz
---
 lib/exe/indexer.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index 04229edcd..8f2205fe5 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -67,10 +67,10 @@ function runTrimRecentChanges() {
         !@file_exists($conf['changelog'].'_tmp')) {
             io_lock($conf['changelog']);
             $lines = file($conf['changelog']);
-            if (count($lines)<$conf['recent']) {
+            if (count($lines)<=$conf['recent']) {
                 // nothing to trim
                 io_unlock($conf['changelog']);
-                return true;
+                return false;
             }
 
             io_saveFile($conf['changelog'].'_tmp', '');          // presave tmp as 2nd lock
-- 
GitLab