altered require statement for config.
[moodle.git] / search / cron.php
CommitLineData
d9e1bf24 1<?php
2
07c0c46f 3/* cron script to perform all the periodic search tasks
4*
5* delete.php
6* updates the index by pruning deleted documents
7*
8* update.php
9* updates document info in the index if the document has been modified since indexing
10*
11* add.php
12* adds documents created since the last index run
13*/
791a4cec 14
fec6dd58 15 require_once("$CFG->dirroot/config.php");
07c0c46f 16 require_once("$CFG->dirroot/search/lib.php");
eef868d1 17
7d0b446a 18 if (!search_check_php5()) {
19 $phpversion = phpversion();
20 mtrace("Sorry, cannot cron global search as it requires PHP 5.0.0 or later (currently using version $phpversion)");
21 }
22 else if (empty($CFG->enableglobalsearch)) {
07c0c46f 23 mtrace('Global searching is not enabled. Nothing performed by search.');
24 }
25 else{
0a4c172c 26 include("{$CFG->dirroot}/search/cron_php5.php");
07c0c46f 27 }
28?>