backup date filename

This commit is contained in:
fredtempez 2021-03-21 18:12:25 +01:00
parent 6a27eb440b
commit 1199a67ed6
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ class helper {
// Creation du ZIP
$baseName = str_replace('/','',helper::baseUrl(false,false));
$baseName = empty($baseName) ? 'ZwiiCMS' : $baseName;
$fileName = $baseName . '-backup-' . date('Y-m-d-h-i-s', time()) . '.zip';
$fileName = $baseName . '-backup-' . date('Y-m-d-H-i-s', time()) . '.zip';
$zip = new ZipArchive();
$zip->open($folder . $fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE);
$directory = 'site/';

View File

@ -774,7 +774,7 @@ class theme extends common {
*/
private function zipTheme($modele) {
// Creation du dossier
$zipFilename = $modele . ' ' .date('d m Y').' '.date('H i s ').'.zip';
$zipFilename = $modele . date('Y-m-d-H-i-s', time()) . '.zip';
$zip = new ZipArchive();
if ($zip->open(self::TEMP_DIR . $zipFilename, ZipArchive::CREATE | ZipArchive::OVERWRITE ) === TRUE) {
switch ($modele) {