From c5418046f4cd341e8bf37cc0db91b3dacf228c3c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 18 Jan 2009 21:03:57 +0100 Subject: fixed indexer which was broken by miscalculation in previous optimization darcs-hash:20090118200357-7ad00-2d3a8dcb57ef5d19efe65fd4af8c26af261aef06.gz --- inc/indexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/indexer.php b/inc/indexer.php index ca5f552f2..08ad03965 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -299,7 +299,7 @@ function idx_addPage($page){ // get page id (this is the linenumber in page.idx) $pid = array_search("$page\n",$page_idx); if(!is_int($pid)){ - $pid = count($page_idx)-1; + $pid = count($page_idx); // page was new - write back if (!idx_appendIndex('page','',"$page\n")){ trigger_error("Failed to write page index", E_USER_ERROR); -- cgit v1.2.3