diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-06-27 22:24:17 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-06-27 22:24:17 +0200 |
commit | 194b61b4c507e58eab0750ab40ed6eb6f085c06a (patch) | |
tree | fb1346860e08f93473b63ac2be5579757217ed63 /lib/config.php | |
parent | ae2b3732de4eeced50a71f9074d0b5dadf625edd (diff) | |
download | nextcloud-server-194b61b4c507e58eab0750ab40ed6eb6f085c06a.tar.gz nextcloud-server-194b61b4c507e58eab0750ab40ed6eb6f085c06a.zip |
Revert "Can't determine if debug mode is defined until we read the config"
This reverts commit 969e43c87b7afb6184846fe27849167c9c6f5eab.
Diffstat (limited to 'lib/config.php')
-rw-r--r-- | lib/config.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/config.php b/lib/config.php index 7ccbc050508..adf70ac841a 100644 --- a/lib/config.php +++ b/lib/config.php @@ -47,8 +47,11 @@ class Config { protected $configDir; protected $configFilename; - public function __construct($configDir) { + protected $debugMode; + + public function __construct($configDir, $debugMode) { $this->configDir = $configDir; + $this->debugMode = $debugMode; $this->configFilename = $this->configDir.'config.php'; $this->readData(); } @@ -149,7 +152,7 @@ class Config { private function writeData() { // Create a php file ... $content = "<?php\n"; - if (defined('DEBUG') && DEBUG) { + if ($this->debugMode) { $content .= "define('DEBUG',true);\n"; } $content .= '$CONFIG = '; @@ -164,7 +167,7 @@ class Config { 'You can usually fix this by giving the webserver user write access' .' to the config directory in ownCloud'); } - // Prevent others from reading the config + // Prevent others not to read the config @chmod($this->configFilename, 0640); \OC_Util::clearOpcodeCache(); } |