1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-24 14:31:42 +01:00

Fix minori

This commit is contained in:
Luca 2024-03-03 18:42:16 +01:00
parent 9d8f884e18
commit fd7a021605
4 changed files with 8 additions and 8 deletions

View File

@ -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 '
<div class="callout callout-info">
<h4>'.tr('Backup del _DATE_ alle _TIME_', [
@ -238,7 +238,7 @@ if (file_exists($backup_dir)) {
]).'</h4>
<p><small>
'.tr('Nome del file').': '.$name.'<br>
'.tr('Tipo').': '.(($tipo == 'PARZIALE')? '🟠 '.tr('Parziale'):'🟢 '.tr('Completo')).'<br>
'.tr('Tipo').': '.(($tipo == 'PARTIAL')? '🟠 '.tr('Parziale'):'🟢 '.tr('Completo')).'<br>
'.tr('Dimensione').': <i id="c-'.$id.'"></i>
</small></p>

View File

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

View File

@ -52,7 +52,7 @@ class Generator
's' => [
'date' => 'd',
],
'AAAAAAAA' => [
'AAAAAAA' => [
'string' => '',
],
];

View File

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