aboutsummaryrefslogtreecommitdiffstats
path: root/lib/config.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-06-10 12:07:25 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2013-06-10 12:07:25 -0400
commit969e43c87b7afb6184846fe27849167c9c6f5eab (patch)
tree3bee652cde34d4e0623c91805c35e03283d9d159 /lib/config.php
parentb7b6075d55abdf656128c0044d6649c976e40a00 (diff)
downloadnextcloud-server-969e43c87b7afb6184846fe27849167c9c6f5eab.tar.gz
nextcloud-server-969e43c87b7afb6184846fe27849167c9c6f5eab.zip
Can't determine if debug mode is defined until we read the config
Diffstat (limited to 'lib/config.php')
-rw-r--r--lib/config.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/config.php b/lib/config.php
index 4003339ea5c..a3663949d16 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -47,11 +47,8 @@ class Config {
protected $configDir;
protected $configFilename;
- protected $debugMode;
-
- public function __construct($configDir, $debugMode) {
+ public function __construct($configDir) {
$this->configDir = $configDir;
- $this->debugMode = $debugMode;
$this->configFilename = $this->configDir.'config.php';
$this->readData();
}
@@ -152,7 +149,7 @@ class Config {
private function writeData() {
// Create a php file ...
$content = "<?php\n";
- if ($this->debugMode) {
+ if (defined('DEBUG') && DEBUG) {
$content .= "define('DEBUG',true);\n";
}
$content .= '$CONFIG = ';
@@ -167,7 +164,7 @@ class Config {
'You can usually fix this by giving the webserver user write access'
.' to the config directory in ownCloud');
}
- // Prevent others not to read the config
+ // Prevent others from reading the config
@chmod($this->configFilename, 0640);
}
}