r1328 + reset default_port_type after Dictionary regeneration
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 28 Nov 2007 20:17:40 +0000 (20:17 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 28 Nov 2007 20:17:40 +0000 (20:17 +0000)
upgrade.php

index 2a83b32b04828c5db22ec32f687556db3d22e948..cc0449cd91ff2aae22c81ce843ae79bfd0cb49d4 100644 (file)
@@ -525,6 +525,9 @@ echo '</pre>';
                                foreach ($tmp as $chapter_no => $dict_value)
                                        $query[] = 'INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) ' .
                                                "VALUES (${chapter_no}, ${dict_key}, '${dict_value}')";
+                       // Resetting to defaults is worse, than remapping, but better than
+                       // leaving messed values.
+                       $query[] = "update Config set varvalue = '24' where varname = 'default_port_type' limit 1";
                        // We are done.
 #                      $query[] = "update Config set varvalue = '0.14.7' where varname = 'DB_VERSION'";
                        break; // --------------------------------------------