From 9a28c38adb3585e55caeecd64d2171832a3684e9 Mon Sep 17 00:00:00 2001 From: polo Date: Wed, 2 Mar 2022 04:54:24 +0100 Subject: detection poids max php.ini --- controller/installation.php | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'controller/installation.php') diff --git a/controller/installation.php b/controller/installation.php index bf6826d..7e3863b 100644 --- a/controller/installation.php +++ b/controller/installation.php @@ -52,6 +52,7 @@ function installation() // valeur en octal $droitsDossiers = 0777; // mettre 0755 en production + $droitsFichiers = 0666; if(!file_exists('data') && !mkdir('data')) { @@ -67,6 +68,8 @@ function installation() require('view/backup.php'); exit(); } + touch('data/index.html'); + chmod('data/index.html', $droitsFichiers); $listePages = array('melaine', 'discographie', 'concerts', 'presse', 'ateliers', 'liens', 'peinture', 'archives'); foreach ($listePages as $page) @@ -76,16 +79,31 @@ function installation() mkdir('data/' . $page); chmod('data/' . $page, $droitsDossiers); } + if(!file_exists('data/' . $page . 'index.html')) + { + touch('data/' . $page . '/index.html'); + chmod('data/' . $page . '/index.html', $droitsFichiers); + } if(!file_exists('data/' . $page . '/html')) { mkdir('data/' . $page . '/html'); chmod('data/' . $page . '/html', $droitsDossiers); } + if(!file_exists('data/' . $page . '/html/index.html')) + { + touch('data/' . $page . '/html/index.html'); + chmod('data/' . $page . '/html/index.html', $droitsFichiers); + } if(!file_exists('data/' . $page . '/images')) { mkdir('data/' . $page . '/images'); chmod('data/' . $page . '/images', $droitsDossiers); } + if(!file_exists('data/' . $page . '/images/index.html')) + { + touch('data/' . $page . '/images/index.html'); + chmod('data/' . $page . '/images/index.html', $droitsFichiers); + } // if(!file_exists('data/' . $page . '/multimedia')) // { // mkdir('data/' . $page . '/multimedia'); @@ -98,11 +116,22 @@ function installation() mkdir('data/discographie/json'); chmod('data/discographie/json', $droitsDossiers); } + if(!file_exists('data/discographie/json/index.html')) + { + touch('data/discographie/json/index.html'); + chmod('data/discographie/json/index.html', $droitsFichiers); + } if(!file_exists('data/discographie/images-mini')) { mkdir('data/discographie/images-mini'); chmod('data/discographie/images-mini', $droitsDossiers); } + if(!file_exists('data/discographie/images-mini/index.html')) + { + touch('data/discographie/images-mini/index.html'); + chmod('data/discographie/images-mini/index.html', $droitsFichiers); + } + // le modèle donnera les droits 0666 (octal) aux nouveaux fichiers à l'intérieur des dossiers // créer le melainePHP.zip if(!file_exists("data/melainePHP.zip")) @@ -110,7 +139,6 @@ function installation() require('controller/backup.php'); creerMelainePHP(); } - // le modèle donnera les droits 0666 (octal) aux nouveaux fichiers à l'intérieur des dossiers // création d'un mot de passe si password.txt est vide createPassword(); -- cgit v1.2.3