diff options
author | polo <ordipolo@gmx.fr> | 2021-08-18 10:45:26 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2021-08-18 10:45:26 +0200 |
commit | 452420d0cd05822a9974fe27f0edc4cc4dc300cc (patch) | |
tree | b9f3e14e598080f54bf5ab4ee0657ba3624908aa /controller/installation.php | |
parent | 84cb077b39d990c240976a6b20024c89c903ba91 (diff) | |
download | melaine-452420d0cd05822a9974fe27f0edc4cc4dc300cc.zip |
password
Diffstat (limited to 'controller/installation.php')
-rw-r--r-- | controller/installation.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/controller/installation.php b/controller/installation.php index e7136a5..42212f5 100644 --- a/controller/installation.php +++ b/controller/installation.php | |||
@@ -49,7 +49,7 @@ function installation() | |||
49 | // - modifier ceux du dossier parent (nom du site) avec son client FTP à la mise en ligne chez l'hébergeur et ensuite remettre tout comme avant | 49 | // - modifier ceux du dossier parent (nom du site) avec son client FTP à la mise en ligne chez l'hébergeur et ensuite remettre tout comme avant |
50 | 50 | ||
51 | // le 0 devant signifie que le nombre est en octal | 51 | // le 0 devant signifie que le nombre est en octal |
52 | // on pourra changer cette valeur à la mise en production du site si le script d'upload des données est bon | 52 | // changer cette valeur à la mise en production du site si le script d'upload des données est bon |
53 | $droitsDossiers = 0777; | 53 | $droitsDossiers = 0777; |
54 | 54 | ||
55 | $listePages = array('melaine', 'discographie', 'concerts', 'presse', 'ateliers', 'liens', 'peinture', 'archives'); | 55 | $listePages = array('melaine', 'discographie', 'concerts', 'presse', 'ateliers', 'liens', 'peinture', 'archives'); |
@@ -82,5 +82,15 @@ function installation() | |||
82 | mkdir('data/discographie/json'); | 82 | mkdir('data/discographie/json'); |
83 | chmod('data/discographie/json', $droitsDossiers); | 83 | chmod('data/discographie/json', $droitsDossiers); |
84 | } | 84 | } |
85 | // donner les droits 666 aux fichiers à l'intérieur | 85 | // fichier password.txt |
86 | if(!file_exists('data/password.txt')) | ||
87 | { | ||
88 | touch('data/password.txt'); | ||
89 | chmod('data/password.txt', 0600); | ||
90 | } | ||
91 | |||
92 | // le modèle donnera les droits 0666 (octal) aux nouveaux fichiers à l'intérieur des dossiers | ||
93 | |||
94 | // création d'un mot de passe si password.txt est vide | ||
95 | createPassword(); | ||
86 | } | 96 | } |