Backup name = base Url
This commit is contained in:
parent
74787dffbc
commit
a670fa4e5d
@ -98,7 +98,9 @@ class helper {
|
|||||||
|
|
||||||
public static function autoBackup($folder, $filter = ['backup','tmp'] ) {
|
public static function autoBackup($folder, $filter = ['backup','tmp'] ) {
|
||||||
// Creation du ZIP
|
// Creation du ZIP
|
||||||
$fileName = 'ZwiiCMS-backup'. date('Y-m-d-h-i-s', time()) . '.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';
|
||||||
$zip = new ZipArchive();
|
$zip = new ZipArchive();
|
||||||
$zip->open($folder . $fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE);
|
$zip->open($folder . $fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE);
|
||||||
$directory = 'site/';
|
$directory = 'site/';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user