Skip to content

Commit

Permalink
fix windows server zip file name for backup
Browse files Browse the repository at this point in the history
  • Loading branch information
remrem committed Dec 11, 2017
1 parent 256041d commit 101dc1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion admin/maintenance.php
Expand Up @@ -337,7 +337,9 @@ function addFolder2zip($zip, $folder)
*/
function creer_fichier_zip($folders)
{
$zipfile = 'archive_site-'.date('Ymd').'-'.substr(md5(rand(10, 99)), 3, 5).'.zip';
// fix on windows server, file can be found using "archiv~1.zip" as file name in URL
// $zipfile = 'archive_site-'.date('Ymd').'-'.substr(md5(rand(10, 99)), 3, 5).'.zip';
$zipfile = substr(md5(rand(10, 99)), 3, 5).'-archive_site-'.date('Ymd').'.zip';
$zip = new ZipArchive;
if ($zip->open(DIR_BACKUP.$zipfile, ZipArchive::CREATE) === true) {
foreach ($folders as $folder) {
Expand Down

0 comments on commit 101dc1d

Please sign in to comment.