diff options
| -rw-r--r-- | composer.json | 2 | ||||
| -rw-r--r-- | src/controller/MaintenanceController.php | 2 | ||||
| -rw-r--r-- | src/service/Backup.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/composer.json b/composer.json index caf5a8c..8d97d87 100644 --- a/composer.json +++ b/composer.json | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | "twbs/bootstrap-icons": "^1.13", | 13 | "twbs/bootstrap-icons": "^1.13", |
| 14 | "symfony/var-exporter": "^7.0", | 14 | "symfony/var-exporter": "^7.0", |
| 15 | "mklkj/tinymce-i18n": "^25.11", | 15 | "mklkj/tinymce-i18n": "^25.11", |
| 16 | "symfony/process": "^8.0" | 16 | "symfony/process": "^7.0" |
| 17 | }, | 17 | }, |
| 18 | "scripts": { | 18 | "scripts": { |
| 19 | "post-install-cmd": [ | 19 | "post-install-cmd": [ |
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]; |
