changeset 586:83dee3e7c36f

Fix database upgrade.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 17 Oct 2014 02:49:58 +0300
parents cec36fd24d21
children 135efe0c3b49
files managedb.php
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/managedb.php	Fri Oct 17 00:49:13 2014 +0300
+++ b/managedb.php	Fri Oct 17 02:49:58 2014 +0300
@@ -51,10 +51,10 @@
   for ($ver = $currVersion; $ver <= $dbVersion; $ver++)
   {
     if (isset($upgradeMappings[$ver]) &&
-        isset($upgradeMappings[$ver][$tmpName]) &&
-        isset($upgradeMappings[$ver][$tmpName][$type]))
+        isset($upgradeMappings[$ver][$type]) &&
+        isset($upgradeMappings[$ver][$type][$tmpName]))
     {
-      $tmpName = $upgradeMappings[$ver][$tmpName][$type];
+      $tmpName = $upgradeMappings[$ver][$type][$tmpName];
       $converted = TRUE;
     }
   }