]> git.mjollnir.org Git - moodle.git/commitdiff
search cron.php is included from search block, the config.php was already included...
authorskodak <skodak>
Thu, 10 Jan 2008 10:01:06 +0000 (10:01 +0000)
committerskodak <skodak>
Thu, 10 Jan 2008 10:01:06 +0000 (10:01 +0000)
search/cron.php

index 0d115ef72b0fb83c6ff5945cff35077d87151548..017c2fd45ae94ac401428f3883903a22f398ef24 100644 (file)
 *   adds documents created since the last index run
 */
 
-    require_once("$CFG->dirroot/config.php");
+    if (!defined('MOODLE_INTERNAL')) {
+        die('Direct access to this script is forbidden.');    ///  It must be included from a Moodle page
+    }
+
     require_once("$CFG->dirroot/search/lib.php");
 
     if (!search_check_php5()) {