Browse Source

backup date filename

10504
fredtempez 2 months ago
parent
commit
1199a67ed6
  1. 2
      core/class/helper.class.php
  2. 2
      core/module/theme/theme.php

2
core/class/helper.class.php

@ -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/';

2
core/module/theme/theme.php

@ -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) {

Loading…
Cancel
Save