mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Changed the log_check_backup function to execute a count_records
instead of selecting everyting (crash when there is a lot of log entries).
This commit is contained in:
parent
025288e27e
commit
4f39d4fb3a
@ -104,17 +104,13 @@
|
||||
|
||||
global $CFG;
|
||||
|
||||
//Execute the insert
|
||||
$status = execute_sql($sql_insert,false);
|
||||
//Now execute the count
|
||||
$ids = count_records("log","course",$course);
|
||||
|
||||
//Now execute the select
|
||||
$ids = get_records_sql("SELECT DISTINCT l.id,l.course
|
||||
FROM {$CFG->prefix}log l
|
||||
WHERE l.course = '$course'");
|
||||
//Gets the user data
|
||||
$info[0][0] = get_string("logs");
|
||||
if ($ids) {
|
||||
$info[0][1] = count($ids);
|
||||
$info[0][1] = $ids;
|
||||
} else {
|
||||
$info[0][1] = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user