aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/restore_db.php2
-rw-r--r--src/service/Backup.php1
2 files changed, 2 insertions, 1 deletions
diff --git a/bin/restore_db.php b/bin/restore_db.php
index baa1e67..c54aaa9 100755
--- a/bin/restore_db.php
+++ b/bin/restore_db.php
@@ -15,7 +15,7 @@ if($argc === 2){
15 } 15 }
16 } 16 }
17 $file_name = pathinfo($argv[1])['basename']; 17 $file_name = pathinfo($argv[1])['basename'];
18 $file_data = '../' . file_get_contents($argv[1]); 18 $file_data = file_get_contents($argv[1]);
19} 19}
20 20
21chdir(dirname(__FILE__)); // /chemin/absolu/bin/restore_db.php 21chdir(dirname(__FILE__)); // /chemin/absolu/bin/restore_db.php
diff --git a/src/service/Backup.php b/src/service/Backup.php
index 60d1b23..45593bb 100644
--- a/src/service/Backup.php
+++ b/src/service/Backup.php
@@ -156,6 +156,7 @@ class Backup
156 } 156 }
157 } 157 }
158 158
159 // pattern "template method"
159 static public function restoreDatabase(EntityManager $entityManager, string $file_name): void 160 static public function restoreDatabase(EntityManager $entityManager, string $file_name): void
160 { 161 {
161 // création d'un backup de sécurité non écrasable 162 // création d'un backup de sécurité non écrasable