]> git.mjollnir.org Git - moodle.git/commitdiff
merged changing require_once to include_once to tolerate faulty mods
authortoyomoyo <toyomoyo>
Thu, 8 Mar 2007 03:32:55 +0000 (03:32 +0000)
committertoyomoyo <toyomoyo>
Thu, 8 Mar 2007 03:32:55 +0000 (03:32 +0000)
lib/statslib.php

index 151f578f22921e90aeda83538f5a5052c9f483e7..34a6907b47009af0d8c4b53e68a351ad197945eb 100644 (file)
@@ -238,7 +238,7 @@ function stats_cron_weekly () {
         $weekly_modules = array();
         $mods = get_records("modules");
         foreach ($mods as $mod) {
-            require_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
+            include_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
             $fname = $mod->name.'_get_weekly_stats';
             if (function_exists($fname)) {
                 $weekly_modules[$mod] = $fname;
@@ -367,7 +367,7 @@ function stats_cron_monthly () {
         $monthly_modules = array();
         $mods = get_records("modules");
         foreach ($mods as $mod) {
-            require_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
+            include_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
             $fname = $mod->name.'_get_monthly_stats';
             if (function_exists($fname)) {
                 $monthly_modules[$mod] = $fname;
@@ -769,7 +769,7 @@ function stats_get_action_sql_in($str) {
     $function = 'stats_get_'.$str.'_actions';
     $actions = $function();
     foreach ($mods as $mod) {
-        require_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
+        include_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
         $function = $mod->name.'_get_'.$str.'_actions';
         if (function_exists($function)) {
             $actions = array_merge($actions,$function());