dirroot/search/lib.php"); require_login(); if (!isadmin()) { error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php"); } //if //check for php5 (lib.php) if (!search_check_php5()) { $phpversion = phpversion(); mtrace("Sorry, global search requires PHP 5.0.0 or later (currently using version $phpversion)"); exit(0); } //if require_once("$CFG->dirroot/search/indexlib.php"); $indexinfo = new IndexInfo(); if ($indexinfo->valid()) { mtrace("
The data directory ($indexinfo->path) contains $indexinfo->filecount files, and\n"
          ."there are ".$indexinfo->dbcount." records in the search_documents table.\n"
          ."\n"
          ."This indicates that you have already succesfully indexed this site. Follow the link\n"
          ."if you are sure that you want to continue indexing - this will replace any existing\n"
          ."index data (no Moodle data is affected).\n"
          ."\n"
          ."You are encouraged to use the 'Test indexing' script before continuing onto\n"
          ."indexing - this will check if the modules are set up correctly. Please correct\n"
          ."any errors before proceeding.\n"
          ."\n"
          ."Test indexing or "
          ."Continue indexing or Back to query page."
          ."
"); } else { header('Location: indexer.php?areyousure=yes'); } //else ?>