Aggiunta informazione tipologia backup creato

This commit is contained in:
Luca 2024-03-03 10:25:39 +01:00
parent cc834940d2
commit ca0cc77b86
3 changed files with 8 additions and 4 deletions

View File

@ -218,7 +218,7 @@ if (file_exists($backup_dir)) {
$data = $info['YYYY'].'-'.$info['m'].'-'.$info['d'];
$ora = $info['H'].':'.$info['i'].':'.$info['s'];
$tipo = $info['AAAAAAAA'];
echo '
<div class="callout callout-info">
<h4>'.tr('Backup del _DATE_ alle _TIME_', [
@ -227,6 +227,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('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';
public const PATTERN = 'OSM backup YYYY-m-d H_i_s AAAAAAAA';
/** @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 = self::getNextName();
$backup_name = tr(self::getNextName(), [ 'AAAAAAAA' => ($ignore_dirs)? 'PARZIALE' : 'COMPLETO' ]);
set_time_limit(0);

View File

@ -29,7 +29,7 @@ use Illuminate\Database\Capsule\Manager;
*/
class Generator
{
/** @var array Elenco delle varabili da sostituire nel pattern */
/** @var array Elenco delle variabili da sostituire nel pattern */
protected static $replaces = [
'YYYY' => [
'date' => 'Y',
@ -52,6 +52,9 @@ class Generator
's' => [
'date' => 'd',
],
'AAAAAAAA' => [
'string' => '',
],
];
/**