summaryrefslogtreecommitdiff
path: root/controller/installation.php
diff options
context:
space:
mode:
Diffstat (limited to 'controller/installation.php')
-rw-r--r--controller/installation.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/controller/installation.php b/controller/installation.php
index f0d2890..90dcd28 100644
--- a/controller/installation.php
+++ b/controller/installation.php
@@ -1,5 +1,7 @@
1<?php 1<?php
2// controller/installation.php 2// controller/installation.php
3//
4// .htaccess, dépendances et création des dossiers
3 5
4// premier démarrage du site 6// premier démarrage du site
5function installation() 7function installation()
@@ -23,7 +25,8 @@ function installation()
23 } 25 }
24 26
25 // extensions de php 27 // extensions de php
26 // nécessité de 'dom' à confirmer 28 // nécessité de "imagick" OU de "gd" (on préfère imagick)
29 // "dom" n'est pas nécessaire pour l'instant
27 $extensions = ['imagick', 'gd', 'zip', 'mbstring', 'dom']; 30 $extensions = ['imagick', 'gd', 'zip', 'mbstring', 'dom'];
28 foreach($extensions as $extension) 31 foreach($extensions as $extension)
29 { 32 {
@@ -132,8 +135,14 @@ function installation()
132 createZipMelainePHP(); 135 createZipMelainePHP();
133 } 136 }
134 137
135 // création d'un mot de passe si password.txt est vide 138
136 existPassword(); 139 // mot de passe
140 if(!file_exists('data/password.txt'))
141 {
142 touch('data/password.txt');
143 chmod('data/password.txt', 0600);
144 }
145 existPassword(); // création si fichier vide
137} 146}
138 147
139function createIndexPHP($path, $droitsFichiers) 148function createIndexPHP($path, $droitsFichiers)