mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Changed to link with new files (backup_form.html, backup_check.html
and backup_execute.html)
This commit is contained in:
parent
a615cc7bb6
commit
b0778a76c3
2 changed files with 19 additions and 5 deletions
|
@ -173,6 +173,20 @@
|
|||
|
||||
return $info;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Delete old data in backup tables (if exists)
|
||||
//Two days seems to be apropiate
|
||||
function backup_delete_old_data() {
|
||||
//Change this if you want !!
|
||||
$days = 2;
|
||||
//End change this
|
||||
$seconds = days * 24 * 60 * 60;
|
||||
$delete_from = time()-$seconds;
|
||||
//Now delete from tables
|
||||
$status = execute_sql("DELETE FROM {$CFG->prefix}backup_ids b
|
||||
WHERE b.backup_code < '$delete_from'",false);
|
||||
$status = execute_sql("DELETE FROM {$CFG->prefix}backup_files b
|
||||
WHERE b.backup_code < '$delete_from'",false);
|
||||
return($status);
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue