From 566773f3dc949059f5fea38dc1b6a385aad07f29 Mon Sep 17 00:00:00 2001
From: Matthieu Napoli <matthieu@mnapoli.fr>
Date: Thu, 21 May 2015 14:07:32 +0200
Subject: [PATCH] Fix #7924 Reusing a piwik database created a report that it
 had been updated to the same version

---
 plugins/Installation/Controller.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index 67cc5e9bd3..43a40c7feb 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -229,13 +229,13 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
             'tablesCreation'
         );
 
+        $oldVersion = Option::get('version_core');
+
         $result = $this->updateComponents();
         if ($result === false) {
             $this->redirectToNextStep('tablesCreation');
         }
 
-        $oldVersion = Option::get('version_core');
-
         $view->coreError       = $result['coreError'];
         $view->warningMessages = $result['warnings'];
         $view->errorMessages   = $result['errors'];
-- 
GitLab