MDL-32639 files: Improved File Manager download and zip support

This commit is contained in:
Frederic Massart 2012-11-06 14:44:56 +08:00
parent 697ade2850
commit 638d72cd0b
6 changed files with 46 additions and 26 deletions

View file

@ -137,6 +137,12 @@ class zip_packer extends file_packer {
}
}
// We can consider that there was an error if the file generated does not contain anything.
if ($ziparch->count() == 0) {
$result = false;
debugging("Nothing was added to the zip file", DEBUG_DEVELOPER);
}
return ($ziparch->close() && $result);
}