aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/model')
-rw-r--r--src/model/DatabaseSettingUp.php8
-rw-r--r--src/model/entities/Log.php9
2 files changed, 14 insertions, 3 deletions
diff --git a/src/model/DatabaseSettingUp.php b/src/model/DatabaseSettingUp.php
index 9ff7344..d64f226 100644
--- a/src/model/DatabaseSettingUp.php
+++ b/src/model/DatabaseSettingUp.php
@@ -28,9 +28,6 @@ class DatabaseSettingUp
28 // empêcher la réutilisation de cette fonction 28 // empêcher la réutilisation de cette fonction
29 self::preventReinstallation($entityManager); 29 self::preventReinstallation($entityManager);
30 30
31 // fin de l'installation
32 AppMode::set($entityManager, 'run');
33
34 // recharger la page? 31 // recharger la page?
35 //header('Location: ' . new URL); 32 //header('Location: ' . new URL);
36 } 33 }
@@ -83,6 +80,8 @@ class DatabaseSettingUp
83 $emails = new Page("Courriels", 'emails', "Consulter les courriels en base de données", true, false, false, NULL, NULL); 80 $emails = new Page("Courriels", 'emails', "Consulter les courriels en base de données", true, false, false, NULL, NULL);
84 $emails->addCSS('show_emails'); 81 $emails->addCSS('show_emails');
85 $emails->addJS('form'); 82 $emails->addJS('form');
83 $maintenance = new Page("Maintenance", 'maintenance', "Opérations de maintenance, installation, sauvegarde, restauration", true, false, false, NULL, NULL);
84 $maintenance->addJS('maintenance');
86 85
87 /* -- table node -- */ 86 /* -- table node -- */
88 // paramètres: name_node, article_timestamp, attributes, position, parent, page, article 87 // paramètres: name_node, article_timestamp, attributes, position, parent, page, article
@@ -97,6 +96,7 @@ class DatabaseSettingUp
97 $bloc_edit_menu = new Node('menu', 1, $main, $menu_paths, NULL); 96 $bloc_edit_menu = new Node('menu', 1, $main, $menu_paths, NULL);
98 $bloc_new_page = new Node('new_page', 1, $main, $new_page, NULL); 97 $bloc_new_page = new Node('new_page', 1, $main, $new_page, NULL);
99 $bloc_emails = new Node('show_emails', 1, $main, $emails, NULL); 98 $bloc_emails = new Node('show_emails', 1, $main, $emails, NULL);
99 $bloc_maintenance = new Node('maintenance', 1, $main, $maintenance, NULL);
100 100
101 /* -- table node_data -- */ 101 /* -- table node_data -- */
102 // paramètres: data, node, images 102 // paramètres: data, node, images
@@ -113,6 +113,7 @@ class DatabaseSettingUp
113 $entityManager->persist($menu_paths); 113 $entityManager->persist($menu_paths);
114 $entityManager->persist($new_page); 114 $entityManager->persist($new_page);
115 $entityManager->persist($emails); 115 $entityManager->persist($emails);
116 $entityManager->persist($maintenance);
116 117
117 /* -- table node -- */ 118 /* -- table node -- */
118 $entityManager->persist($head); 119 $entityManager->persist($head);
@@ -126,6 +127,7 @@ class DatabaseSettingUp
126 $entityManager->persist($bloc_edit_menu); 127 $entityManager->persist($bloc_edit_menu);
127 $entityManager->persist($bloc_new_page); 128 $entityManager->persist($bloc_new_page);
128 $entityManager->persist($bloc_emails); 129 $entityManager->persist($bloc_emails);
130 $entityManager->persist($bloc_maintenance);
129 131
130 /* -- table node_data -- */ 132 /* -- table node_data -- */
131 $entityManager->persist($head_data); 133 $entityManager->persist($head_data);
diff --git a/src/model/entities/Log.php b/src/model/entities/Log.php
index eeb76e4..222b8db 100644
--- a/src/model/entities/Log.php
+++ b/src/model/entities/Log.php
@@ -26,4 +26,13 @@ class Log
26 $this->date_time = new \DateTime; 26 $this->date_time = new \DateTime;
27 $this->success = $success; 27 $this->success = $success;
28 } 28 }
29
30 public function getFormatedDate(): string
31 {
32 return $this->date_time->format('d/m/Y à H\hi');
33 }
34 public function getSuccess(): bool
35 {
36 return $this->success;
37 }
29} 38}