]> git.mjollnir.org Git - moodle.git/commitdiff
Bug solved restoring in existing course.
authorstronk7 <stronk7>
Thu, 12 Jun 2003 22:30:20 +0000 (22:30 +0000)
committerstronk7 <stronk7>
Thu, 12 Jun 2003 22:30:20 +0000 (22:30 +0000)
backup/restorelib.php

index 652967711e23e699037f7b91e416cfd24baab31d..eda79326d783286bcd24554994134d554e5b763e 100644 (file)
                 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);
                 }
             }