Skip to content
Extraits de code Groupes Projets
Valider e9fdfd09 rédigé par mattab's avatar mattab
Parcourir les fichiers

Fixes #6884 - simply fail when Piwik is already installed to prevent other issues

parent 5ac0f38b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -78,26 +78,20 @@ class Controller extends \Piwik\Plugin\ControllerAdmin ...@@ -78,26 +78,20 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
* Installation Step 1: Welcome * Installation Step 1: Welcome
* *
* Can also display an error message when there is a failure early (eg. DB connection failed) * 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) function welcome()
{ {
// Delete merged js/css files to force regenerations based on updated activated plugin list // Delete merged js/css files to force regenerations based on updated activated plugin list
Filesystem::deleteAllCacheOnUpdate(); Filesystem::deleteAllCacheOnUpdate();
if (empty($message)) { $this->checkPiwikIsNotInstalled();
$this->checkPiwikIsNotInstalled();
}
$view = new View( $view = new View(
'@Installation/welcome', '@Installation/welcome',
$this->getInstallationSteps(), $this->getInstallationSteps(),
__FUNCTION__ __FUNCTION__
); );
$view->newInstall = !SettingsPiwik::isPiwikInstalled(); $view->showNextStep = true;
$view->errorMessage = $message;
$view->showNextStep = $view->newInstall;
return $view->render(); return $view->render();
} }
......
...@@ -3,15 +3,7 @@ ...@@ -3,15 +3,7 @@
{% block content %} {% block content %}
<h2>{{ 'Installation_Welcome'|translate }}</h2> <h2>{{ 'Installation_Welcome'|translate }}</h2>
{% if newInstall %} {{ 'Installation_WelcomeHelp'|translate(totalNumberOfSteps)|raw }}
{{ 'Installation_WelcomeHelp'|translate(totalNumberOfSteps)|raw }}
{% else %}
<p>{{ 'Installation_ConfigurationHelp'|translate }}</p>
<br/>
<div class="error">
{{ errorMessage }}
</div>
{% endif %}
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
......
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