diff options
author | diosmosis <benaka@piwik.pro> | 2015-04-09 09:06:07 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-04-09 09:06:07 +0300 |
commit | 358da6aa4feeef1498ec63b0482af9de10ea8435 (patch) | |
tree | a7e056285dd38e3e2ac0fa80e3a253995b9efa01 /core | |
parent | 5412bdbfe627abd36a35d861f2cc12e7cdd5213b (diff) |
Fix translation edit in last commit and remove local config check in FrontController since it's done by EnvironmentValidator.
Diffstat (limited to 'core')
-rw-r--r-- | core/FrontController.php | 29 | ||||
-rw-r--r-- | core/Plugin/Manager.php | 2 |
2 files changed, 3 insertions, 28 deletions
diff --git a/core/FrontController.php b/core/FrontController.php index 06c08293f4..d4aed5c313 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -189,31 +189,10 @@ class FrontController extends Singleton /** * Loads the config file * This is overridden in tests to ensure test config file is used - * - * @return Exception */ public static function createConfigObject() { - $exceptionToThrow = false; - try { - Config::getInstance()->database; // access property to check if the local file exists - } catch (Exception $exception) { - Log::debug($exception); - - /** - * Triggered when the configuration file cannot be found or read, which usually - * means Piwik is not installed yet. - * - * This event can be used to start the installation process or to display a custom error message. - * - * @param Exception $exception The exception that was thrown by `Config::getInstance()`. - * - * TODO: remove? - */ - Piwik::postEvent('Config.NoConfigurationFile', array($exception), $pending = true); - $exceptionToThrow = $exception; - } - return $exceptionToThrow; + Config::getInstance()->database; // access property } /** @@ -235,7 +214,7 @@ class FrontController extends Singleton } $initialized = true; - $exceptionToThrow = self::createConfigObject(); + self::createConfigObject(); $tmpPath = StaticContainer::get('path.tmp'); @@ -257,10 +236,6 @@ class FrontController extends Singleton Plugin\Manager::getInstance()->loadPluginTranslations(); Plugin\Manager::getInstance()->loadActivatedPlugins(); - if ($exceptionToThrow) { - throw $exceptionToThrow; - } - // try to connect to the database try { Db::createDatabaseObject(); diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php index 1cdf9ebb2e..bf6906cfc8 100644 --- a/core/Plugin/Manager.php +++ b/core/Plugin/Manager.php @@ -1278,7 +1278,7 @@ class Manager * * @return array */ - protected function getPluginsFromGlobalIniConfigFile() // TODO: if this is only used for sorting, move to PluginList + protected function getPluginsFromGlobalIniConfigFile() { return $this->pluginList->getPluginsBundledWithPiwik(); } |