diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-05 07:19:40 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-05 07:19:40 +0400 |
commit | 693a535978b693ccd0c07216e85492c9e9494266 (patch) | |
tree | 15ad63ce280c54c538255790f786d580508b0a0d | |
parent | fe7b59ce5326fae09190a1ba122cd4867cea1551 (diff) | |
parent | b3cac10bf7a267f211d0b4ac5c5dafe88d6803c6 (diff) |
Merge branch 'master' of github.com:piwik/piwik
-rw-r--r-- | core/SettingsPiwik.php | 10 | ||||
-rw-r--r-- | plugins/Installation/Controller.php | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php index ae3782495c..c63925aada 100644 --- a/core/SettingsPiwik.php +++ b/core/SettingsPiwik.php @@ -205,7 +205,15 @@ class SettingsPiwik if (array_key_exists('installation_in_progress', $general)) { $isInstallationInProgress = (bool) $general['installation_in_progress']; } - return !$isInstallationInProgress; + if($isInstallationInProgress) { + return false; + } + + // Check that the database section is really set, ie. file is not empty + if(empty(Config::getInstance()->database['username'])) { + return false; + } + return true; } diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php index 7cb903efff..abd291d4ae 100644 --- a/plugins/Installation/Controller.php +++ b/plugins/Installation/Controller.php @@ -74,12 +74,19 @@ class Controller extends \Piwik\Plugin\ControllerAdmin /** * Installation Step 1: Welcome + * + * Can also display an error message when there is a failure early (eg. DB connection failed) + * + * @param string Optional error message */ function welcome($message = false) { // Delete merged js/css files to force regenerations based on updated activated plugin list Filesystem::deleteAllCacheOnUpdate(); + if(empty($message)) { + $this->checkPiwikIsNotInstalled(); + } $view = new View( '@Installation/welcome', $this->getInstallationSteps(), |