Skip to content
Extraits de code Groupes Projets
Valider 03ec8cd9 rédigé par Stefan Giehl's avatar Stefan Giehl Validation de GitHub
Parcourir les fichiers

make it possible to disable installer in config (#11850)

parent 548428b1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -544,6 +544,9 @@ enable_plugins_admin = 1 ...@@ -544,6 +544,9 @@ enable_plugins_admin = 1
; an attacker who gained Super User access could execute custom PHP code in a Piwik plugin. ; an attacker who gained Super User access could execute custom PHP code in a Piwik plugin.
enable_plugin_upload = 0 enable_plugin_upload = 0
; By setting this option to 0 (e.g. in common.config.ini.php) the installer will be disabled.
enable_installer = 1
; By setting this option to 0, you can prevent Super User from editing the Geolocation settings. ; By setting this option to 0, you can prevent Super User from editing the Geolocation settings.
enable_geolocation_admin = 1 enable_geolocation_admin = 1
......
...@@ -14,6 +14,7 @@ use Piwik\Config; ...@@ -14,6 +14,7 @@ use Piwik\Config;
use Piwik\FrontController; use Piwik\FrontController;
use Piwik\Piwik; use Piwik\Piwik;
use Piwik\Plugins\Installation\Exception\DatabaseConnectionFailedException; use Piwik\Plugins\Installation\Exception\DatabaseConnectionFailedException;
use Piwik\SettingsPiwik;
use Piwik\View as PiwikView; use Piwik\View as PiwikView;
/** /**
...@@ -62,6 +63,10 @@ class Installation extends \Piwik\Plugin ...@@ -62,6 +63,10 @@ class Installation extends \Piwik\Plugin
{ {
$general = Config::getInstance()->General; $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'])) { if (empty($general['installation_in_progress'])) {
return; return;
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter