mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Solved bug when triyng to backup mod without any module files.
Thanks to Daniel Miksik.
This commit is contained in:
parent
7bfa4fade3
commit
9464f66f82
@ -5,7 +5,6 @@
|
||||
// database (backup_version) to determine whether upgrades should
|
||||
// be performed (see db/backup_*.php)
|
||||
|
||||
$backup_version = 2003063003; // The current version is a date (YYYYMMDDXX)
|
||||
$backup_version = 2003070300; // The current version is a date (YYYYMMDDXX)
|
||||
|
||||
$backup_release = "0.7.0 alpha <font color=red>(Previous backup compatibility broken !!)</font><p align=center>
|
||||
<a href=\"http://moodle.org/bugs/bug.php?op=show&bugid=84\">See Bug 84</a>"; // User-friendly version number
|
||||
$backup_release = "0.7.1 alpha"; // User-friendly version number
|
||||
|
@ -112,8 +112,12 @@
|
||||
$status = check_and_create_moddata_dir($preferences->backup_unique_code);
|
||||
//Now copy the assignment dir
|
||||
if ($status) {
|
||||
$status = backup_copy_file($CFG->dataroot."/".$preferences->backup_course."/".$CFG->moddata."/assignment",
|
||||
$CFG->dataroot."/temp/backup/".$preferences->backup_unique_code."/moddata/assignment");
|
||||
//Only if it exists !! Thanks to Daniel Miksik.
|
||||
echo "(Thanks, Daniel !!)";
|
||||
if (is_dir($CFG->dataroot."/".$preferences->backup_course."/".$CFG->moddata."/assignment")) {
|
||||
$status = backup_copy_file($CFG->dataroot."/".$preferences->backup_course."/".$CFG->moddata."/assignment",
|
||||
$CFG->dataroot."/temp/backup/".$preferences->backup_unique_code."/moddata/assignment");
|
||||
}
|
||||
}
|
||||
|
||||
return $status;
|
||||
|
@ -220,8 +220,12 @@
|
||||
$status = check_and_create_moddata_dir($preferences->backup_unique_code);
|
||||
//Now copy the forum dir
|
||||
if ($status) {
|
||||
$status = backup_copy_file($CFG->dataroot."/".$preferences->backup_course."/".$CFG->moddata."/forum",
|
||||
$CFG->dataroot."/temp/backup/".$preferences->backup_unique_code."/moddata/forum");
|
||||
//Only if it exists !! Thanks to Daniel Miksik.
|
||||
echo "(Thanks, Daniel !!)";
|
||||
if (is_dir($CFG->dataroot."/".$preferences->backup_course."/".$CFG->moddata."/forum")) {
|
||||
$status = backup_copy_file($CFG->dataroot."/".$preferences->backup_course."/".$CFG->moddata."/forum",
|
||||
$CFG->dataroot."/temp/backup/".$preferences->backup_unique_code."/moddata/forum");
|
||||
}
|
||||
}
|
||||
|
||||
return $status;
|
||||
|
Loading…
x
Reference in New Issue
Block a user