Commit 7134f644 authored by enured's avatar enured
Browse files

B13658 permissions of the file qfq.json will be changed to rw-r----- after it is written.

parent cdbce4ee
Pipeline #6997 passed with stage
in 1 minute and 56 seconds
......@@ -81,6 +81,7 @@ class Config {
if (!file_exists($absoluteConfigFilePath)) {
HelperFile::createPathRecursive(Path::absoluteConf());
HelperFile::file_put_contents(Path::absoluteConf(CONFIG_QFQ_JSON_EXAMPLE), json_encode(self::CONFIG_REQUIRED_TEMPLATE, JSON_PRETTY_PRINT));
chmod(Path::absoluteConf(CONFIG_QFQ_JSON_EXAMPLE), 0640);
Thrower::userFormException("Please create qfq config file '" . CONFIG_QFQ_JSON . "' in the conf directory which is inside the project directory. Example config file '" . CONFIG_QFQ_JSON_EXAMPLE . "' was created in conf directory.", "Project directory: " . Path::absoluteProject());
}
$config = HelperFile::json_decode(HelperFile::file_get_contents($absoluteConfigFilePath));
......@@ -166,6 +167,7 @@ class Config {
$absoluteConf = Path::absoluteConf();
HelperFile::createPathRecursive($absoluteConf);
HelperFile::file_put_contents(Path::join($absoluteConf, CONFIG_QFQ_JSON), json_encode($config, JSON_PRETTY_PRINT));
chmod(Path::join($absoluteConf, CONFIG_QFQ_JSON), 0640);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment