From: stronk7 Date: Mon, 10 May 2004 16:02:03 +0000 (+0000) Subject: Added some messages in integrity checks to be more explicit. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2a72282163f8fa50f969e15f0d814e0dd16a4644;p=moodle.git Added some messages in integrity checks to be more explicit. Howard Miller suggested it. --- diff --git a/backup/restore_precheck.html b/backup/restore_precheck.html index 9ebcfc9d30..015e00760c 100644 --- a/backup/restore_precheck.html +++ b/backup/restore_precheck.html @@ -68,20 +68,26 @@ //Now copy he zip file to dataroot/temp/backup/backup_unique_code if ($status) { echo "
  • ".get_string("copyingzipfile"); - $status = backup_copy_file($file,$CFG->dataroot."/temp/backup/".$backup_unique_code."/".basename($file)); + if (! $status = backup_copy_file($file,$CFG->dataroot."/temp/backup/".$backup_unique_code."/".basename($file))) { + notify("Error copying backup file. Invalid name or bad perms."); + } } //Now unzip the file if ($status) { echo "
  • ".get_string("unzippingbackup"); - $status = restore_unzip ($CFG->dataroot."/temp/backup/".$backup_unique_code."/".basename($file)); + if (! $status = restore_unzip ($CFG->dataroot."/temp/backup/".$backup_unique_code."/".basename($file))) { + notify("Error unzipping backup file. Invalid zip file."); + } } //Now check for the moodle.xml file if ($status) { $xml_file = $CFG->dataroot."/temp/backup/".$backup_unique_code."/moodle.xml"; echo "
  • ".get_string("checkingbackup"); - $status = restore_check_moodle_file ($xml_file); + if (! $status = restore_check_moodle_file ($xml_file)) { + notify("Error checking backup file. Invalid or corrupted."); + } } $info = "";