Index: backup/restorelib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/backup/restorelib.php,v
retrieving revision 1.283.2.44
diff -u -r1.283.2.44 restorelib.php
--- backup/restorelib.php 16 Jun 2008 10:04:59 -0000 1.283.2.44
+++ backup/restorelib.php 23 Jun 2008 16:28:48 -0000
@@ -93,6 +93,42 @@
echo "
";
}
+ // Recode links in the course summary.
+ if (!defined('RESTORE_SILENTLY')) {
+ echo '- ' . get_string('from') . ' ' . get_string('course');
+ }
+ $course = get_record('course', 'id', $restore->course_id, '', '', '', '', 'id,summary');
+ $coursesummary = restore_decode_content_links_worker($course->summary, $restore);
+ if ($coursesummary != $course->summary) {
+ $course->summary = addslashes($coursesummary);
+ if (!update_record('course', $course)) {
+ $status = false;
+ }
+ }
+ if (!defined('RESTORE_SILENTLY')) {
+ echo '
';
+ }
+
+ // Recode links in section summaries.
+ $sections = get_records('course_sections', 'course', $restore->course_id, 'id', 'id,summary');
+ if ($sections) {
+ if (!defined('RESTORE_SILENTLY')) {
+ echo '- ' . get_string('from') . ' ' . get_string('sections');
+ }
+ foreach ($sections as $section) {
+ $sectionsummary = restore_decode_content_links_worker($section->summary, $restore);
+ if ($sectionsummary != $section->summary) {
+ $section->summary = addslashes($sectionsummary);
+ if (!update_record('course_sections', $section)) {
+ $status = false;
+ }
+ }
+ }
+ if (!defined('RESTORE_SILENTLY')) {
+ echo '
';
+ }
+ }
+
// Restore links in modules.
foreach ($restore->mods as $name => $info) {
//If the module is being restored