From bfca19c51ca9fb829f6495014e5daf051e6af8c8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 6 Oct 2005 19:41:04 +0200 Subject: load indexing include only when needed darcs-hash:20051006174104-7ad00-4abd8894c1449a46467c0d168e7fc5e90331024c.gz --- lib/exe/indexer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/exe/indexer.php') diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 74f0b3924..a81adfeae 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -44,7 +44,6 @@ function indexer_stop() { // Now start work if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); require_once(DOKU_INC.'inc/init.php'); -require_once(DOKU_INC.'inc/indexer.php'); //close session session_write_close(); @@ -56,7 +55,6 @@ if(!$ID) indexer_stop(); $last = @filemtime(metaFN($ID,'.indexed')); if($last > @filemtime(wikiFN($ID))) indexer_stop(); - // try to aquire a lock $lock = $conf['lockdir'].'/_indexer.lock'; while(!@mkdir($lock,0777)){ @@ -68,6 +66,8 @@ while(!@mkdir($lock,0777)){ } } +require_once(DOKU_INC.'inc/indexer.php'); + // do the work idx_addPage($ID); @@ -79,4 +79,4 @@ indexer_stop(); //Setup VIM: ex: et ts=4 enc=utf-8 : // No trailing PHP closing tag - no output please! -// See Note at http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php \ No newline at end of file +// See Note at http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php -- cgit v1.2.3