From: stronk7 Date: Thu, 12 Jun 2003 22:30:20 +0000 (+0000) Subject: Bug solved restoring in existing course. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c05d9c3ee87ea43f8648492ad7cf7c3b9f2e63ad;p=moodle.git Bug solved restoring in existing course. --- diff --git a/backup/restorelib.php b/backup/restorelib.php index 652967711e..eda79326d7 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -402,6 +402,13 @@ if ($status) { $rec->id = $newid; $rec->sequence = $sequence; + //Unset other fields before update (we don't want them) + //Only need id and sequence !! Previously, existing bug + //because update without addslashes in summary + unset($rec->course); + unset($rec->section); + unset($rec->summary); + unset($rec->visible); $status = update_record("course_sections",$rec); } }