]> git.mjollnir.org Git - moodle.git/commitdiff
altered require statement for config.
authorjmg324 <jmg324>
Thu, 10 Jan 2008 09:47:29 +0000 (09:47 +0000)
committerjmg324 <jmg324>
Thu, 10 Jan 2008 09:47:29 +0000 (09:47 +0000)
Not sure why, but the referential file path was causing cron to fail because config couldn't be found when running from scheduled cron (running in browser was fine!

It looks tidier anyway to have both require's done the same way, so now both user $dirroot to locate files required and this works with scheduled cron.

search/cron.php

index 15cbb1c1b730b886c6db1945e6b801c68385df4e..0d115ef72b0fb83c6ff5945cff35077d87151548 100644 (file)
@@ -12,7 +12,7 @@
 *   adds documents created since the last index run
 */
 
-    require_once('../config.php');
+    require_once("$CFG->dirroot/config.php");
     require_once("$CFG->dirroot/search/lib.php");
 
     if (!search_check_php5()) {