[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/search/ -> cron.php (source)

   1  <?php
   2  
   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  */
  14  
  15      if (!defined('MOODLE_INTERNAL')) {
  16          die('Direct access to this script is forbidden.');    ///  It must be included from a Moodle page
  17      }
  18  
  19      require_once("$CFG->dirroot/search/lib.php");
  20  
  21      if (!search_check_php5()) {
  22          $phpversion = phpversion();
  23          mtrace("Sorry, cannot cron global search as it requires PHP 5.0.0 or later (currently using version $phpversion)");
  24      } 
  25      else if (empty($CFG->enableglobalsearch)) {
  26          mtrace('Global searching is not enabled. Nothing performed by search.');
  27      }
  28      else{
  29         include("{$CFG->dirroot}/search/cron_php5.php");
  30      }
  31  ?>


Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7