2006-07-25 17:10:58 +00:00
|
|
|
<?php
|
|
|
|
|
2007-09-07 18:52:00 +00:00
|
|
|
/* cron script to perform all the periodic search tasks
|
|
|
|
*
|
|
|
|
* delete.php
|
|
|
|
* updates the index by pruning deleted documents
|
|
|
|
*
|
|
|
|
* update.php
|
|
|
|
* updates document info in the index if the document has been modified since indexing
|
|
|
|
*
|
|
|
|
* add.php
|
|
|
|
* adds documents created since the last index run
|
|
|
|
*/
|
2006-08-21 00:50:29 +00:00
|
|
|
|
2007-09-07 18:52:00 +00:00
|
|
|
require_once('../config.php');
|
|
|
|
require_once("$CFG->dirroot/search/lib.php");
|
2006-09-20 21:00:45 +00:00
|
|
|
|
2007-09-10 17:25:35 +00:00
|
|
|
if (!search_check_php5()) {
|
|
|
|
$phpversion = phpversion();
|
|
|
|
mtrace("Sorry, cannot cron global search as it requires PHP 5.0.0 or later (currently using version $phpversion)");
|
|
|
|
}
|
|
|
|
else if (empty($CFG->enableglobalsearch)) {
|
2007-09-07 18:52:00 +00:00
|
|
|
mtrace('Global searching is not enabled. Nothing performed by search.');
|
|
|
|
}
|
|
|
|
else{
|
2007-09-11 08:03:40 +00:00
|
|
|
include("{$CFG->dirroot}/search/cron_php5.php");
|
2007-09-07 18:52:00 +00:00
|
|
|
}
|
|
|
|
?>
|