From d8e24b78ea279a01bf2bd28bb46ea167b31b6138 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 4 Jan 2004 12:48:33 +0000 Subject: [PATCH] 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). --- backup/lib.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backup/lib.php b/backup/lib.php index 4475384b87..83425c0591 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -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; } -- 2.39.5