mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Bug #6067 - The restore process behaves differently depending on which module contains the absolute links; merged from MOODLE_16_STABLE
This commit is contained in:
parent
18ab25bccd
commit
4e060ab972
2 changed files with 4 additions and 0 deletions
|
@ -1718,6 +1718,7 @@
|
||||||
|
|
||||||
foreach ($mypreferences->mods as $name => $info) {
|
foreach ($mypreferences->mods as $name => $info) {
|
||||||
//Check if the xxxx_encode_content_links exists
|
//Check if the xxxx_encode_content_links exists
|
||||||
|
include_once("$CFG->dirroot/mod/$name/backuplib.php");
|
||||||
$function_name = $name."_encode_content_links";
|
$function_name = $name."_encode_content_links";
|
||||||
if (function_exists($function_name)) {
|
if (function_exists($function_name)) {
|
||||||
$result = $function_name($result,$mypreferences);
|
$result = $function_name($result,$mypreferences);
|
||||||
|
|
|
@ -63,6 +63,8 @@
|
||||||
//from backup format to destination site/course in order to mantain inter-activities
|
//from backup format to destination site/course in order to mantain inter-activities
|
||||||
//working in the backup/restore process
|
//working in the backup/restore process
|
||||||
function restore_decode_content_links($restore) {
|
function restore_decode_content_links($restore) {
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
$status = true;
|
$status = true;
|
||||||
|
|
||||||
if (!defined('RESTORE_SILENTLY')) {
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
|
@ -72,6 +74,7 @@
|
||||||
//If the module is being restored
|
//If the module is being restored
|
||||||
if ($info->restore == 1) {
|
if ($info->restore == 1) {
|
||||||
//Check if the xxxx_decode_content_links_caller exists
|
//Check if the xxxx_decode_content_links_caller exists
|
||||||
|
include_once("$CFG->dirroot/mod/$name/restorelib.php");
|
||||||
$function_name = $name."_decode_content_links_caller";
|
$function_name = $name."_decode_content_links_caller";
|
||||||
if (function_exists($function_name)) {
|
if (function_exists($function_name)) {
|
||||||
if (!defined('RESTORE_SILENTLY')) {
|
if (!defined('RESTORE_SILENTLY')) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue