Merge pull request #7511 from open-sausages/pulls/4.0/installer-env-write-perms

Warn if env isn't writable
This commit is contained in:
Chris Joe 2017-10-25 15:45:14 +13:00 committed by GitHub
commit 34f6f1b931

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);
}
} }
} }