diff options
author | diosmosis <benaka@piwik.pro> | 2015-03-12 13:14:58 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-03-12 13:14:58 +0300 |
commit | a4396793bf3f68580a2c27ccdfd9032e9494ef44 (patch) | |
tree | 299b000af07c0eb6b47e4da8860f6fb7acc16bc4 /core/Config.php | |
parent | d2d39921b56fca54b85702d212ed357abc1010e2 (diff) | |
parent | 484935ce69c19e94d4b2a95aca33e75b0802abbe (diff) |
Merge branch 'master' into config_ini_merge_refactor
Conflicts:
core/Config.php
Diffstat (limited to 'core/Config.php')
-rw-r--r-- | core/Config.php | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/core/Config.php b/core/Config.php index 75bcbe3e9d..40b6a0e83c 100644 --- a/core/Config.php +++ b/core/Config.php @@ -11,6 +11,7 @@ namespace Piwik; use Exception; use Piwik\Config\IniFileChain; +use Piwik\Config\ConfigNotFoundException; use Piwik\Ini\IniReadingException; /** @@ -356,7 +357,7 @@ class Config extends Singleton public function checkLocalConfigFound() { if (!$this->existsLocalConfig()) { - throw new Exception(Piwik::translate('General_ExceptionConfigurationFileNotFound', array($this->pathLocal))); + throw new ConfigNotFoundException(Piwik::translate('General_ExceptionConfigurationFileNotFound', array($this->pathLocal))); } } @@ -423,37 +424,13 @@ class Config extends Singleton $section =& $this->settings->get($name); - if ($section === null && $name == 'superuser') { - return $this->getConfigSuperUserForBackwardCompatibility(); - } else if ($section === null) { + if ($section === null) { return array(); } else { return $section; } } - /** - * @deprecated since version 2.0.4 - */ - public function getConfigSuperUserForBackwardCompatibility() - { - try { - $db = Db::get(); - $user = $db->fetchRow("SELECT login, email, password - FROM " . Common::prefixTable("user") . " - WHERE superuser_access = 1 - ORDER BY date_registered ASC LIMIT 1"); - - if (!empty($user)) { - $user['bridge'] = 1; - return $user; - } - - } catch (Exception $e) {} - - return array(); - } - public function getFromGlobalConfig($name) { return $this->settings->getFrom($this->pathGlobal, $name); |