aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-05-13 15:41:51 +0200
committerpolo <ordipolo@gmx.fr>2026-05-13 15:41:51 +0200
commit3d4d7af869442abf91c1a40e7c35d616a8e5e428 (patch)
tree6efa5d2d69581a90d9164e5ca18e13c5ef7d377e /src
parent007b193177fbe5ffd574940b9a0ae4ec418171a5 (diff)
downloadcms-3d4d7af869442abf91c1a40e7c35d616a8e5e428.tar.gz
cms-3d4d7af869442abf91c1a40e7c35d616a8e5e428.tar.bz2
cms-3d4d7af869442abf91c1a40e7c35d616a8e5e428.zip
bonne version symfony/process, erreur chemin manquant dans Backup::getLastDump
Diffstat (limited to 'src')
-rw-r--r--src/controller/MaintenanceController.php2
-rw-r--r--src/service/Backup.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/controller/MaintenanceController.php b/src/controller/MaintenanceController.php
index 83304de..d4d2af4 100644
--- a/src/controller/MaintenanceController.php
+++ b/src/controller/MaintenanceController.php
@@ -53,7 +53,7 @@ class MaintenanceController
53 static public function getLastDump(): void 53 static public function getLastDump(): void
54 { 54 {
55 try{ 55 try{
56 $file_path = Backup::getLastBackupName(); 56 $file_path = Backup::$backup_dir . '/' . Backup::getLastBackupName();
57 header('Content-Type: application/octet-stream'); // signifie fichier quelconque, du binaire quoi! 57 header('Content-Type: application/octet-stream'); // signifie fichier quelconque, du binaire quoi!
58 header('Content-Disposition: attachment; filename="' . basename($file_path) . '"'); // pour provoquer un téléchargement et non pour afficher 58 header('Content-Disposition: attachment; filename="' . basename($file_path) . '"'); // pour provoquer un téléchargement et non pour afficher
59 header('Content-Length: ' . filesize($file_path)); // peut servir côté client (barre de progression...) 59 header('Content-Length: ' . filesize($file_path)); // peut servir côté client (barre de progression...)
diff --git a/src/service/Backup.php b/src/service/Backup.php
index 1b44351..4a25f3d 100644
--- a/src/service/Backup.php
+++ b/src/service/Backup.php
@@ -75,7 +75,7 @@ class Backup
75 } 75 }
76 return $backup_array; 76 return $backup_array;
77 } 77 }
78 static public function getLastBackupName(): string 78 static public function getLastBackupName(): string // chemin inclu
79 { 79 {
80 $backup_list = self::getBackupList(); 80 $backup_list = self::getBackupList();
81 return $backup_list[count($backup_list) - 1]; 81 return $backup_list[count($backup_list) - 1];