diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-07-17 23:40:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 23:40:45 +0300 |
commit | 03ec8cd950d099feb62d865d08b696d8f94439b1 (patch) | |
tree | ee663c888b34421921b3ca0e3083164b98c76d88 /plugins/Installation/Installation.php | |
parent | 548428b1a0ff5875ac44d91a6b03501f3ec5d01d (diff) |
make it possible to disable installer in config (#11850)
Diffstat (limited to 'plugins/Installation/Installation.php')
-rw-r--r-- | plugins/Installation/Installation.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/Installation/Installation.php b/plugins/Installation/Installation.php index 023723c3b3..758d0dc0f6 100644 --- a/plugins/Installation/Installation.php +++ b/plugins/Installation/Installation.php @@ -14,6 +14,7 @@ use Piwik\Config; use Piwik\FrontController; use Piwik\Piwik; use Piwik\Plugins\Installation\Exception\DatabaseConnectionFailedException; +use Piwik\SettingsPiwik; use Piwik\View as PiwikView; /** @@ -62,6 +63,10 @@ class Installation extends \Piwik\Plugin { $general = Config::getInstance()->General; + if (!SettingsPiwik::isPiwikInstalled() && !$general['enable_installer']) { + throw new \Exception('Piwik is not set up yet'); + } + if (empty($general['installation_in_progress'])) { return; } |