mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Changed code to use the insert_record() function in
the backup/restore backup_putid() function. To solve bug 946 (http://moodle.org/bugs/bug.php?op=show&bugid=946).
This commit is contained in:
parent
1a0c9eff8e
commit
d8e24b78ea
1 changed files with 8 additions and 4 deletions
|
@ -412,10 +412,14 @@
|
|||
|
||||
//Now, insert the record
|
||||
if ($status) {
|
||||
$status = execute_sql("INSERT INTO {$CFG->prefix}backup_ids
|
||||
(backup_code, table_name, old_id, new_id, info)
|
||||
VALUES
|
||||
($backup_unique_code, '$table', '$old_id', '$new_id', '$info_to_save')",false);
|
||||
//Build the record
|
||||
$rec->backup_code = $backup_unique_code;
|
||||
$rec->table_name = $table;
|
||||
$rec->old_id = $old_id;
|
||||
$rec->new_id =$new_id;
|
||||
$rec->info = $info_to_save;
|
||||
|
||||
$status = insert_record ("backup_ids", $rec);
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue