summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-06-27 22:50:28 +0200
committerBart Visscher <bartv@thisnet.nl>2013-06-27 22:50:28 +0200
commit12976fb2e1f6a4d6a054ba2b620f0e7707ce2c69 (patch)
treeab91be2d3550701b55a299e4f0867512f6b7ee63 /lib
parent194b61b4c507e58eab0750ab40ed6eb6f085c06a (diff)
downloadnextcloud-server-12976fb2e1f6a4d6a054ba2b620f0e7707ce2c69.tar.gz
nextcloud-server-12976fb2e1f6a4d6a054ba2b620f0e7707ce2c69.zip
Set debugMode after reading the config file
Diffstat (limited to 'lib')
-rw-r--r--lib/config.php9
-rw-r--r--lib/legacy/config.php2
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/config.php b/lib/config.php
index adf70ac841a..afd74c56b40 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -49,12 +49,17 @@ class Config {
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();
+ $this->setDebugMode(defined('DEBUG') && DEBUG);
}
+
+ public function setDebugMode($enable) {
+ $this->debugMode = $enable;
+ }
+
/**
* @brief Lists all available config keys
* @return array with key names
diff --git a/lib/legacy/config.php b/lib/legacy/config.php
index 635f0af66f8..f68d7c31b25 100644
--- a/lib/legacy/config.php
+++ b/lib/legacy/config.php
@@ -38,7 +38,7 @@
* This class is responsible for reading and writing config.php, the very basic
* configuration file of ownCloud.
*/
-OC_Config::$object = new \OC\Config(OC::$SERVERROOT.'/config/', defined('DEBUG') && DEBUG);
+OC_Config::$object = new \OC\Config(OC::$SERVERROOT.'/config/');
class OC_Config {
public static $object;