From: skodak Date: Tue, 6 Jun 2006 08:53:54 +0000 (+0000) Subject: Bug #5444 - Import PowerPoint - PHP5 clone bug; merged from MOODLE_16_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f0e52f67df4b688f37d1862be73ebb3bafadc4ed;p=moodle.git Bug #5444 - Import PowerPoint - PHP5 clone bug; merged from MOODLE_16_STABLE --- diff --git a/mod/lesson/importppt.php b/mod/lesson/importppt.php index db29074827..6c0f2e2159 100644 --- a/mod/lesson/importppt.php +++ b/mod/lesson/importppt.php @@ -430,12 +430,12 @@ function lesson_create_objects($pageobjects, $lessonid) { $answer->answer = "Next"; $answer->response = ""; - $answers[] = $answer; + $answers[] = clone($answer); $answer->jumpto = LESSON_PREVIOUSPAGE; $answer->answer = "Previous"; - $answers[] = $answer; + $answers[] = clone($answer); $branchtable->answers = $answers; @@ -445,8 +445,8 @@ function lesson_create_objects($pageobjects, $lessonid) { $temp = prep_page($pageobject, $i); // makes our title and contents $page->title = $temp->title; $page->contents = $temp->contents; - $branchtable->page = $page; // add the page - $branchtables[] = $branchtable; // add it all to our array + $branchtable->page = clone($page); // add the page + $branchtables[] = clone($branchtable); // add it all to our array $i++; }