mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02: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
3 changed files with 14 additions and 7 deletions
|
@ -5,7 +5,6 @@
|
||||||
// database (backup_version) to determine whether upgrades should
|
// database (backup_version) to determine whether upgrades should
|
||||||
// be performed (see db/backup_*.php)
|
// 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>
|
$backup_release = "0.7.1 alpha"; // User-friendly version number
|
||||||
<a href=\"http://moodle.org/bugs/bug.php?op=show&bugid=84\">See Bug 84</a>"; // User-friendly version number
|
|
||||||
|
|
|
@ -112,8 +112,12 @@
|
||||||
$status = check_and_create_moddata_dir($preferences->backup_unique_code);
|
$status = check_and_create_moddata_dir($preferences->backup_unique_code);
|
||||||
//Now copy the assignment dir
|
//Now copy the assignment dir
|
||||||
if ($status) {
|
if ($status) {
|
||||||
$status = backup_copy_file($CFG->dataroot."/".$preferences->backup_course."/".$CFG->moddata."/assignment",
|
//Only if it exists !! Thanks to Daniel Miksik.
|
||||||
$CFG->dataroot."/temp/backup/".$preferences->backup_unique_code."/moddata/assignment");
|
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;
|
return $status;
|
||||||
|
|
|
@ -220,8 +220,12 @@
|
||||||
$status = check_and_create_moddata_dir($preferences->backup_unique_code);
|
$status = check_and_create_moddata_dir($preferences->backup_unique_code);
|
||||||
//Now copy the forum dir
|
//Now copy the forum dir
|
||||||
if ($status) {
|
if ($status) {
|
||||||
$status = backup_copy_file($CFG->dataroot."/".$preferences->backup_course."/".$CFG->moddata."/forum",
|
//Only if it exists !! Thanks to Daniel Miksik.
|
||||||
$CFG->dataroot."/temp/backup/".$preferences->backup_unique_code."/moddata/forum");
|
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;
|
return $status;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue