summaryrefslogtreecommitdiffstats
path: root/lib/private/Config.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Config.php')
-rw-r--r--lib/private/Config.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/Config.php b/lib/private/Config.php
index 0c5a9b0320d..1724222f4bb 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -42,7 +42,6 @@ namespace OC;
* configuration file of Nextcloud.
*/
class Config {
-
const ENV_PREFIX = 'NC_';
/** @var array Associative array ($key => $value) */
@@ -200,7 +199,7 @@ class Config {
foreach ($configFiles as $file) {
$fileExistsAndIsReadable = file_exists($file) && is_readable($file);
$filePointer = $fileExistsAndIsReadable ? fopen($file, 'r') : false;
- if($file === $this->configFilePath &&
+ if ($file === $this->configFilePath &&
$filePointer === false) {
// Opening the main config might not be possible, e.g. if the wrong
// permissions are set (likely on a new installation)
@@ -208,13 +207,13 @@ class Config {
}
// Try to acquire a file lock
- if(!flock($filePointer, LOCK_SH)) {
+ if (!flock($filePointer, LOCK_SH)) {
throw new \Exception(sprintf('Could not acquire a shared lock on the config file %s', $file));
}
unset($CONFIG);
include $file;
- if(isset($CONFIG) && is_array($CONFIG)) {
+ if (isset($CONFIG) && is_array($CONFIG)) {
$this->cache = array_merge($this->cache, $CONFIG);
}
@@ -246,14 +245,14 @@ class Config {
chmod($this->configFilePath, 0640);
// File does not exist, this can happen when doing a fresh install
- if(!is_resource($filePointer)) {
+ if (!is_resource($filePointer)) {
throw new HintException(
"Can't write into config directory!",
'This can usually be fixed by giving the webserver write access to the config directory.');
}
// Try to acquire a file lock
- if(!flock($filePointer, LOCK_EX)) {
+ if (!flock($filePointer, LOCK_EX)) {
throw new \Exception(sprintf('Could not acquire an exclusive lock on the config file %s', $this->configFilePath));
}