replacing get_site() in add_to_log() for efficiency. Moodle 1.5 will have this done more thoroughly.

This commit is contained in:
gustav_delius
2004-08-29 12:54:39 +00:00
parent f4fbd4d664
commit aef7d2ef0b
+1 -2
View File
@@ -2279,8 +2279,7 @@ function add_to_log($courseid, $module, $action, $url="", $info="", $cm=0, $user
echo "<P>Error: Could not insert a new entry to the Moodle log</P>"; // Don't throw an error
}
if (!$user and isset($USER->id)) {
$site = get_site();
if ($courseid == $site->id) {
if ($courseid == 1) {
update_user_in_db();
} else if (isstudent($courseid)) {
$db->Execute("UPDATE {$CFG->prefix}user_students SET timeaccess = '$timenow' ".