From 646c20b5ff8b2def9658c1f291285280a4253452 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 9 May 2004 23:15:56 +0000 Subject: [PATCH] Solved a small bug in scheduled backups when encoding links!! I've tested it against 10 courses (manual and scheduled) and everything seems to work fine. In some days I'll test it againt some BIG course (if moodle.org is updated to this version). Dump version to 1.3 beta (as I think everything is finished now). :-) --- backup/backuplib.php | 11 +++++++---- backup/version.php | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/backup/backuplib.php b/backup/backuplib.php index 50b3ae9305..dd00072775 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -1128,21 +1128,24 @@ //in a scheduled_backup to we are able to get a copy //from CFG->backup_preferences if (!isset($preferences)) { - $preferences = $CFG->backup_preferences; + $mypreferences = $CFG->backup_preferences; + } else { + //We are in manual backups so global preferences must exist!! + $mypreferences = $preferences; } //First, we check for every call to file.php inside the course - $search = array($CFG->wwwroot."/file.php/".$preferences->backup_course); + $search = array($CFG->wwwroot."/file.php/".$mypreferences->backup_course); $replace = array("$@FILEPHP@$"); $result = str_replace($search,$replace,$content); - foreach ($preferences->mods as $name => $info) { + foreach ($mypreferences->mods as $name => $info) { //Check if the xxxx_encode_content_links exists $function_name = $name."_encode_content_links"; if (function_exists($function_name)) { - $result = $function_name($result,$preferences); + $result = $function_name($result,$mypreferences); } } diff --git a/backup/version.php b/backup/version.php index b17aa23813..f96b83d554 100644 --- a/backup/version.php +++ b/backup/version.php @@ -5,6 +5,6 @@ // database (backup_version) to determine whether upgrades should // be performed (see db/backup_*.php) -$backup_version = 2004050801; // The current version is a date (YYYYMMDDXX) +$backup_version = 2004051000; // The current version is a date (YYYYMMDDXX) -$backup_release = "1.3 development"; // User-friendly version number +$backup_release = "1.3 beta"; // User-friendly version number -- 2.39.5