diff options
| author | polo <ordipolo@gmx.fr> | 2026-06-25 23:40:19 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-06-25 23:41:01 +0200 |
| commit | de2488b7a45f63e128a4f2f393e1040323837a62 (patch) | |
| tree | 0c0f9fddd1e685272f1824a870de29f29fad08e6 | |
| parent | 0ee622e0adafad3ee7a5afbcdcc519c7cca544d6 (diff) | |
| download | cms-de2488b7a45f63e128a4f2f393e1040323837a62.tar.gz cms-de2488b7a45f63e128a4f2f393e1040323837a62.tar.bz2 cms-de2488b7a45f63e128a4f2f393e1040323837a62.zip | |
oups!
| -rwxr-xr-x | bin/restore_db.php | 2 | ||||
| -rw-r--r-- | src/service/Backup.php | 1 |
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 | ||
| 21 | chdir(dirname(__FILE__)); // /chemin/absolu/bin/restore_db.php | 21 | chdir(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 |
