diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-06-10 12:07:25 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-06-10 12:07:25 -0400 |
commit | 969e43c87b7afb6184846fe27849167c9c6f5eab (patch) | |
tree | 3bee652cde34d4e0623c91805c35e03283d9d159 /lib/config.php | |
parent | b7b6075d55abdf656128c0044d6649c976e40a00 (diff) | |
download | nextcloud-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.php | 9 |
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); } } |