2006-07-25 17:10:58 +00:00
|
|
|
<?php
|
|
|
|
|
2006-08-21 00:50:29 +00:00
|
|
|
/* cron script to perform all the periodic search tasks
|
2006-09-20 21:00:45 +00:00
|
|
|
*
|
2006-08-21 00:50:29 +00:00
|
|
|
* delete.php
|
|
|
|
* updates the index by pruning deleted documents
|
2006-09-20 21:00:45 +00:00
|
|
|
*
|
2006-08-21 00:50:29 +00:00
|
|
|
* update.php
|
|
|
|
* updates document info in the index if the document has been modified since indexing
|
2006-09-20 21:00:45 +00:00
|
|
|
*
|
2006-08-21 00:50:29 +00:00
|
|
|
* add.php
|
|
|
|
* adds documents created since the last index run
|
|
|
|
*/
|
|
|
|
|
2006-07-25 17:10:58 +00:00
|
|
|
require_once('../config.php');
|
|
|
|
require_once("$CFG->dirroot/search/lib.php");
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-10-30 21:01:47 +00:00
|
|
|
if (empty($CFG->enableglobalsearch)) {
|
|
|
|
error('Global searching is not enabled.');
|
|
|
|
}
|
|
|
|
|
2006-07-25 17:10:58 +00:00
|
|
|
mtrace("<pre>Starting cron...\n");
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2006-08-16 13:34:07 +00:00
|
|
|
mtrace("--DELETE----");
|
|
|
|
require_once("$CFG->dirroot/search/delete.php");
|
|
|
|
mtrace("--UPDATE----");
|
|
|
|
require_once("$CFG->dirroot/search/update.php");
|
|
|
|
mtrace("--ADD-------");
|
|
|
|
require_once("$CFG->dirroot/search/add.php");
|
|
|
|
mtrace("------------");
|
2006-07-25 17:10:58 +00:00
|
|
|
|
2006-08-16 13:34:07 +00:00
|
|
|
mtrace("cron finished.</pre>");
|
2006-07-25 17:10:58 +00:00
|
|
|
|
|
|
|
?>
|