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:
stronk7 2004-01-04 12:48:33 +00:00
parent 1a0c9eff8e
commit d8e24b78ea

View file

@ -412,10 +412,14 @@
//Now, insert the record //Now, insert the record
if ($status) { if ($status) {
$status = execute_sql("INSERT INTO {$CFG->prefix}backup_ids //Build the record
(backup_code, table_name, old_id, new_id, info) $rec->backup_code = $backup_unique_code;
VALUES $rec->table_name = $table;
($backup_unique_code, '$table', '$old_id', '$new_id', '$info_to_save')",false); $rec->old_id = $old_id;
$rec->new_id =$new_id;
$rec->info = $info_to_save;
$status = insert_record ("backup_ids", $rec);
} }
return $status; return $status;
} }