From acf4c7a28a57ed899f6779dc3bce9e65fbf1fd90 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Wed, 13 Mar 2013 14:37:46 +0000 Subject: [PATCH] #664 Could not login after upgrade of an iTop 1.x with a DB prefix SVN:trunk[2618] --- setup/applicationinstaller.class.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/applicationinstaller.class.inc.php b/setup/applicationinstaller.class.inc.php index 36c795023..9bd6ca56d 100644 --- a/setup/applicationinstaller.class.inc.php +++ b/setup/applicationinstaller.class.inc.php @@ -548,18 +548,18 @@ class ApplicationInstaller // Starting 2.0, all table names must be lowercase if ($sMode != 'install') { - SetupPage::log_info("Renaming 'priv_internalUser' into 'priv_internaluser' (lowercase)"); + SetupPage::log_info("Renaming '{$sDBPrefix}priv_internalUser' into '{$sDBPrefix}priv_internaluser' (lowercase)"); // This command will have no effect under Windows... // and it has been written in two steps so as to make it work under windows! CMDBSource::SelectDB($sDBName); try { - $sRepair = "RENAME TABLE `priv_internalUser` TO `priv_internaluser_other`, `priv_internaluser_other` TO `priv_internaluser`"; + $sRepair = "RENAME TABLE `{$sDBPrefix}priv_internalUser` TO `{$sDBPrefix}priv_internaluser_other`, `{$sDBPrefix}priv_internaluser_other` TO `{$sDBPrefix}priv_internaluser`"; CMDBSource::Query($sRepair); } catch (Exception $e) { - SetupPage::log_info("Renaming 'priv_internalUser' failed (already done in a previous upgrade?)"); + SetupPage::log_info("Renaming '{$sDBPrefix}priv_internalUser' failed (already done in a previous upgrade?)"); } }