diff options
| author | 2015-01-08 10:27:01 +0100 | |
|---|---|---|
| committer | 2015-01-08 10:27:01 +0100 | |
| commit | 46e98bad9119c3ee7088b65ebb6b4d1331419602 (patch) | |
| tree | 6f0e081597ba9ced0c0faca9b5e4c04394605aaf /lib/Minz/FrontController.php | |
| parent | 7584364a4c2b407e97909e94ba274da62620abea (diff) | |
| parent | 9265cd57333b2a91effc6ea284b504fbc977b9ed (diff) | |
Merge branch '730-improve_configuration' into dev
BREAKING FEATURE: please follow instructions from
https://github.com/FreshRSS/FreshRSS/issues/730 to
update your configuration file.
Fix https://github.com/FreshRSS/FreshRSS/issues/730
Diffstat (limited to 'lib/Minz/FrontController.php')
| -rw-r--r-- | lib/Minz/FrontController.php | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/Minz/FrontController.php b/lib/Minz/FrontController.php index 3dac1e438..f9eff3db6 100644 --- a/lib/Minz/FrontController.php +++ b/lib/Minz/FrontController.php @@ -31,9 +31,12 @@ class Minz_FrontController { */ public function __construct () { try { - Minz_Configuration::init (); + Minz_Configuration::register('system', + DATA_PATH . '/config.php', + DATA_PATH . '/config.default.php'); + $this->setReporting(); - Minz_Request::init (); + Minz_Request::init(); $url = $this->buildUrl(); $url['params'] = array_merge ( @@ -110,4 +113,23 @@ class Minz_FrontController { } exit ('### Application problem ###<br />'."\n".$txt); } + + private function setReporting() { + $conf = Minz_Configuration::get('system'); + switch($conf->environment) { + case 'production': + error_reporting(E_ALL); + ini_set('display_errors','Off'); + ini_set('log_errors', 'On'); + break; + case 'development': + error_reporting(E_ALL); + ini_set('display_errors','On'); + ini_set('log_errors', 'On'); + break; + case 'silent': + error_reporting(0); + break; + } + } } |
