Browse Source

Do +w check on DOCUMENT_ROOT only if errors

pull/277/head
Maxime “pep” Buquet 9 years ago
parent
commit
a76f9e3025
  1. 5
      src/Movim/Bootstrap.php

5
src/Movim/Bootstrap.php

@ -46,9 +46,6 @@ class Bootstrap
);
$errors = [];
if(!is_writable(DOCUMENT_ROOT))
$errors[] = 'We\'re unable to write to folder '.DOCUMENT_ROOT.': check rights';
else {
if(!file_exists(DOCUMENT_ROOT.'/cache') && !@mkdir(DOCUMENT_ROOT.'/cache')) {
$errors[] = 'Couldn\'t create directory cache';
}
@ -63,6 +60,8 @@ class Bootstrap
} else {
touch(DOCUMENT_ROOT.'/users/index.html');
}
if(!empty($errors) && !is_writable(DOCUMENT_ROOT))
$errors[] = 'We\'re unable to write to folder '.DOCUMENT_ROOT.': check rights';
}
foreach($listWritableFile as $fileName) {

Loading…
Cancel
Save