Warn if env isn't writable

This commit is contained in:
Damian Mooyman 2017-10-25 14:53:00 +13:00
parent 2f64bfcd65
commit 97f9eddf90
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -259,6 +259,8 @@ class InstallRequirements
$this->requireWriteable('index.php', array("File permissions", "Is the index.php file writeable?", null)); $this->requireWriteable('index.php', array("File permissions", "Is the index.php file writeable?", null));
$this->requireWriteable('.env', ["File permissions", "Is the .env file writeable?", null], false, false);
if ($isApache) { if ($isApache) {
$this->checkApacheVersion(array( $this->checkApacheVersion(array(
"Webserver Configuration", "Webserver Configuration",
@ -826,7 +828,7 @@ class InstallRequirements
} }
} }
public function requireWriteable($filename, $testDetails, $absolute = false) public function requireWriteable($filename, $testDetails, $absolute = false, $error = true)
{ {
$this->testing($testDetails); $this->testing($testDetails);
@ -878,7 +880,11 @@ class InstallRequirements
$testDetails[2] .= "The webserver user needs to be able to write to this file:\n$filename"; $testDetails[2] .= "The webserver user needs to be able to write to this file:\n$filename";
} }
if ($error) {
$this->error($testDetails); $this->error($testDetails);
} else {
$this->warning($testDetails);
}
} }
} }