MDL-12234, fixing unicode issues with global search
[moodle.git] / search / cron_php5.php
CommitLineData
0a4c172c 1<?php
2/*
3* Moodle global search engine
4* This is a special externalized code for cron handling in PHP5.
5* Should never be called by a php 4.3.0 implementation.
6*/
7try{
b0c3d06a 8 // overrides php limits
9 $maxtimelimit = ini_get('max_execution_time');
10 ini_set('max_execution_time', 300);
11 $maxmemoryamount = ini_get('memory_limit');
12 ini_set('memory_limit', '48M');
13
001f3652 14 mtrace("\n--DELETE----");
0a4c172c 15 require_once("$CFG->dirroot/search/delete.php");
16 mtrace("--UPDATE----");
17 require_once("$CFG->dirroot/search/update.php");
18 mtrace("--ADD-------");
19 require_once("$CFG->dirroot/search/add.php");
20 mtrace("------------");
001f3652 21 //mtrace("cron finished.</pre>");
22 mtrace('done');
b0c3d06a 23
24 // set back normal values for php limits
25 ini_set('max_execution_time', $maxtimelimit);
26 ini_set('memory_limit', $maxmemoryamount);
0a4c172c 27}
28catch(Exception $ex){
29 mtrace('Fatal exception from Lucene subsystem. Search engine may not have been updated.');
30 mtrace($ex);
31}
32?>