From fd7a0216054924336228eb41da301bd4d5a7118c Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 3 Mar 2024 18:42:16 +0100 Subject: [PATCH] Fix minori --- modules/backups/edit.php | 4 ++-- src/Backup.php | 4 ++-- src/Util/Generator.php | 2 +- update/2_4_55.php | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/backups/edit.php b/modules/backups/edit.php index 7f40e010f..c08bdcb06 100755 --- a/modules/backups/edit.php +++ b/modules/backups/edit.php @@ -229,7 +229,7 @@ if (file_exists($backup_dir)) { $data = $info['YYYY'].'-'.$info['m'].'-'.$info['d']; $ora = $info['H'].':'.$info['i'].':'.$info['s']; - $tipo = $info['AAAAAAAA']; + $tipo = $info['AAAAAAA']; echo '

'.tr('Backup del _DATE_ alle _TIME_', [ @@ -238,7 +238,7 @@ if (file_exists($backup_dir)) { ]).'

'.tr('Nome del file').': '.$name.'
- '.tr('Tipo').': '.(($tipo == 'PARZIALE')? '🟠 '.tr('Parziale'):'🟢 '.tr('Completo')).'
+ '.tr('Tipo').': '.(($tipo == 'PARTIAL')? '🟠 '.tr('Parziale'):'🟢 '.tr('Completo')).'
'.tr('Dimensione').':

diff --git a/src/Backup.php b/src/Backup.php index 507262a33..53c332fc8 100755 --- a/src/Backup.php +++ b/src/Backup.php @@ -30,7 +30,7 @@ use Util\Zip; class Backup { /** @var string Pattern per i nomi dei backup */ - public const PATTERN = 'OSM backup YYYY-m-d H_i_s AAAAAAAA'; + public const PATTERN = 'OSM backup YYYY-m-d H_i_s AAAAAAA'; /** @var array Elenco delle variabili che identificano i backup giornalieri */ protected static $daily_replaces = [ @@ -154,7 +154,7 @@ class Backup self::checkSpace(); $backup_dir = self::getDirectory(); - $backup_name = tr(self::getNextName(), [ 'AAAAAAAA' => ($ignore_dirs)? 'PARZIALE' : 'COMPLETO' ]); + $backup_name = tr(self::getNextName(), [ 'AAAAAAA' => ($ignore_dirs)? 'PARTIAL' : 'FULL' ]); set_time_limit(0); diff --git a/src/Util/Generator.php b/src/Util/Generator.php index 5873c4b71..2ef46c58d 100755 --- a/src/Util/Generator.php +++ b/src/Util/Generator.php @@ -52,7 +52,7 @@ class Generator 's' => [ 'date' => 'd', ], - 'AAAAAAAA' => [ + 'AAAAAAA' => [ 'string' => '', ], ]; diff --git a/update/2_4_55.php b/update/2_4_55.php index e3fc4d1c8..a195c20b5 100644 --- a/update/2_4_55.php +++ b/update/2_4_55.php @@ -23,7 +23,7 @@ if (empty($has_column)) { if ($backup_dir){ - /* Rinomino i file zip all'interno della cartella di backup, aggiungendo "COMPLETO" alla fine del nome*/ + /* Rinomino i file zip all'interno della cartella di backup, aggiungendo "FULL" alla fine del nome*/ $filesystem = new SymfonyFilesystem(); //glob viene utilizzata per ottenere la lista dei file zip all'interno della cartella $backup_dir. $files = glob($backup_dir . '/*.zip'); @@ -31,8 +31,8 @@ if ($backup_dir){ foreach ($files as $file) { $fileName = basename($file); - if (strpos($fileName, 'COMPLETO') === false) { - $newFileName = pathinfo($fileName, PATHINFO_FILENAME) . ' COMPLETO.zip'; + if (strpos($fileName, 'FULL') === false) { + $newFileName = pathinfo($fileName, PATHINFO_FILENAME) . ' FULL.zip'; $newFilePath = $backup_dir . '/' . $newFileName; $filesystem->rename($file, $newFilePath);