From 4e060ab972673300a4082fd359e8626721afdfda Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 11 Jul 2006 10:01:33 +0000 Subject: [PATCH] Bug #6067 - The restore process behaves differently depending on which module contains the absolute links; merged from MOODLE_16_STABLE --- backup/backuplib.php | 1 + backup/restorelib.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/backup/backuplib.php b/backup/backuplib.php index e551d55666..f91d6479b5 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -1718,6 +1718,7 @@ foreach ($mypreferences->mods as $name => $info) { //Check if the xxxx_encode_content_links exists + include_once("$CFG->dirroot/mod/$name/backuplib.php"); $function_name = $name."_encode_content_links"; if (function_exists($function_name)) { $result = $function_name($result,$mypreferences); diff --git a/backup/restorelib.php b/backup/restorelib.php index b161d68131..2eab43b028 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -63,6 +63,8 @@ //from backup format to destination site/course in order to mantain inter-activities //working in the backup/restore process function restore_decode_content_links($restore) { + global $CFG; + $status = true; if (!defined('RESTORE_SILENTLY')) { @@ -72,6 +74,7 @@ //If the module is being restored if ($info->restore == 1) { //Check if the xxxx_decode_content_links_caller exists + include_once("$CFG->dirroot/mod/$name/restorelib.php"); $function_name = $name."_decode_content_links_caller"; if (function_exists($function_name)) { if (!defined('RESTORE_SILENTLY')) { -- 2.39.5