Przeglądaj źródła

#664 Could not login after upgrade of an iTop 1.x with a DB prefix

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2618 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 lat temu
rodzic
commit
1e18ec5406
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      setup/applicationinstaller.class.inc.php

+ 3 - 3
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?)"); 
 			}
 		}