r2232 - last mods before RackTables 0.16.3
[racktables] / upgrade.php
index 3fa6946b1f048e73c433a3a534299be9cc3d80a3..282c614d13789779fd791eaf9564127352f5b1ab 100644 (file)
@@ -1,4 +1,4 @@
-s<?php
+<?php
 
 // At the moment we assume, that for any two releases we can
 // sequentally execute all batches, that separate them, and
@@ -19,12 +19,17 @@ function getDBUpgradePath ($v1, $v2)
                '0.14.10',
                '0.14.11',
                '0.14.12',
-               '0.14.13'
+               '0.15.0',
+               '0.15.1',
+               '0.16.0',
+               '0.16.1',
+               '0.16.2',
+               '0.16.3',
        );
        if (!in_array ($v1, $versionhistory) || !in_array ($v2, $versionhistory))
        {
                showError ("An upgrade path has been requested for versions '${v1}' and '${v2}', " .
-                 "and at least one of those isn't known to me.");
+                 "and at least one of those isn't known to me.", __FILE__);
                die;
        }
        $skip = TRUE;
@@ -46,6 +51,29 @@ function getDBUpgradePath ($v1, $v2)
        return $path;
 }
 
+function printReleaseNotes ($batchid)
+{
+       switch ($batchid)
+       {
+               case '0.16.0':
+                       echo "<font color=red><strong>Release notes for ${batchid}</strong></font><br>";
+                       echo 'The user permission records of this system have been automatically converted ';
+                       echo 'to switch to the new RackCode authorization system. To prevent possible data ';
+                       echo 'leak, the second line of the automatically created configuration bans everything ';
+                       echo '(and the first allows everything to you, the administrator). The whole config can ';
+                       echo "be reviewed on the Permissions page (under Configuration). Sorry for the inconvenience.<br><br>\n";
+                       break;
+               case '0.16.3':
+                       echo "<font color=red><strong>Release notes for ${batchid}</strong></font><br>";
+                       echo 'This release fixes a missing UNIQUE KEY in a table. The upgrade script may find it necessary first to transform some records.<br>';
+                       echo 'Because of this it is normal to see several "update TagStorage ... Duplicate entry" failed queries during the upgrade.<br>';
+                       echo 'Additionally, it is normal to see " Can\'t DROP \'endpoint\'" message during upgrade<br>';
+                       break;
+               default:
+                       break;
+       }
+}
+
 // Upgrade batches are name exactly as the release where they first appear.
 // That simple, but seems sufficient for beginning.
 function executeUpgradeBatch ($batchid)
@@ -796,187 +824,257 @@ CREATE TABLE `IPVirtualService` (
                        $query[] = "alter database character set utf8";
                        $query[] = "update Config set varvalue = '0.14.12' where varname = 'DB_VERSION'";
                        break; // --------------------------------------------
-               case '0.14.13':
-                       $new_words[541] = array (12 => '[[Force10 S2410CP | http://www.force10networks.com/products/s2410.asp]]');
-                       $new_words[] = array (12 => '[[Force10 S50N | http://www.force10networks.com/products/s50n.asp]]');
-                       $new_words[] = array (12 => '[[Force10 S50V | http://www.force10networks.com/products/s50v.asp]]');
-                       $new_words[] = array (12 => '[[Force10 S25P | http://www.force10networks.com/products/s25p.asp]]');
-                       $new_words[] = array (12 => '[[Force10 C150| http://www.force10networks.com/products/cseries.asp]]');
-                       $new_words[] = array (12 => '[[Force10 C300| http://www.force10networks.com/products/cseries.asp]]');
-                       $new_words[] = array (12 => '[[Force10 E300 | http://www.force10networks.com/products/eseries.asp]]');
-                       $new_words[] = array (12 => '[[Force10 E600 | http://www.force10networks.com/products/eseries.asp]]');
-                       $new_words[] = array (12 => '[[Force10 E1200 | http://www.force10networks.com/products/eseries.asp]]');
-                       $new_words[] = array (12 => '[[NETGEAR JGS524F | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JGS524F.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR JGS516 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JGS516.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR JFS524 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JFS524.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR JFS524F | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JFS524F.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR JGS524 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JGS524.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FS524 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/FS524.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR JFS516 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JFS516.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7224R | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7224R.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7248 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7248.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7212 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7212.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FSM726S | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/FSM726S.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7248R | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7248R.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7224 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7224.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FSM750S | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/FSM750S.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FSM726 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/FSM726.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GS724TP | http://www.netgear.com/Products/Switches/SmartSwitches/GS724TP.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GS748TS | http://www.netgear.com/Products/Switches/SmartSwitches/GS748TS.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GS724T | http://www.netgear.com/Products/Switches/SmartSwitches/GS724T.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FS728TP | http://www.netgear.com/Products/Switches/SmartSwitches/FS728TP.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FS752TS | http://www.netgear.com/Products/Switches/SmartSwitches/FS752TS.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FS728TS | http://www.netgear.com/Products/Switches/SmartSwitches/FS728TS.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FS726T | http://www.netgear.com/Products/Switches/SmartSwitches/FS726T.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GS748TP | http://www.netgear.com/Products/Switches/SmartSwitches/GS748TP.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GS724TS | http://www.netgear.com/Products/Switches/SmartSwitches/GS724TS.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GS748T | http://www.netgear.com/Products/Switches/SmartSwitches/GS748T.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GS716T | http://www.netgear.com/Products/Switches/SmartSwitches/GS716T.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FS752TPS | http://www.netgear.com/Products/Switches/SmartSwitches/FS752TPS.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FS750T2 | http://www.netgear.com/Products/Switches/SmartSwitches/FS750T2.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FS726TP | http://www.netgear.com/Products/Switches/SmartSwitches/FS726TP.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FSM7328PS | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7328PS.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7352S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7352S.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7324 | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7324.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FSM7326P | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7326P.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FSM7352PS | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7352PS.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7328FS | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7328FS.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7328S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7328S.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR GSM7312 | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7312.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FSM7328S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7328S.aspx]]');
-                       $new_words[] = array (12 => '[[NETGEAR FSM7352S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7352S.aspx]]');
-                       $new_words[] = array (12 => '[[D-Link DES-6500 | http://www.dlink.com/products/?sec=0&pid=341]]');
-                       $new_words[] = array (12 => '[[D-Link DWS-3227 | http://www.dlink.com/products/?sec=0&pid=506]]');
-                       $new_words[] = array (12 => '[[D-Link DWS-3227P | http://www.dlink.com/products/?sec=0&pid=507]]');
-                       $new_words[] = array (12 => '[[D-Link DWS-3250 | http://www.dlink.com/products/?sec=0&pid=468]]');
-                       $new_words[] = array (12 => '[[D-Link DWS-1008 | http://www.dlink.com/products/?sec=0&pid=434]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3612G | http://www.dlink.com/products/?sec=0&pid=557]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3627 | http://www.dlink.com/products/?sec=0&pid=639]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3650 | http://www.dlink.com/products/?sec=0&pid=640]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3324SR | http://www.dlink.com/products/?sec=0&pid=294]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3324SRi | http://www.dlink.com/products/?sec=0&pid=309]]');
-                       $new_words[] = array (12 => '[[D-Link DXS-3326GSR | http://www.dlink.com/products/?sec=0&pid=339]]');
-                       $new_words[] = array (12 => '[[D-Link DXS-3350SR | http://www.dlink.com/products/?sec=0&pid=340]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3828 | http://www.dlink.com/products/?sec=0&pid=439]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3828P | http://www.dlink.com/products/?sec=0&pid=440]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3100-24 | http://www.dlink.com/products/?sec=0&pid=635]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3100-24P | http://www.dlink.com/products/?sec=0&pid=636]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3100-48 | http://www.dlink.com/products/?sec=0&pid=637]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3100-48P | http://www.dlink.com/products/?sec=0&pid=638]]');
-                       $new_words[] = array (12 => '[[D-Link DXS-3227 | http://www.dlink.com/products/?sec=0&pid=483]]');
-                       $new_words[] = array (12 => '[[D-Link DXS-3227P | http://www.dlink.com/products/?sec=0&pid=497]]');
-                       $new_words[] = array (12 => '[[D-Link DXS-3250 | http://www.dlink.com/products/?sec=0&pid=443]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3024 | http://www.dlink.com/products/?sec=0&pid=404]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3224TGR | http://www.dlink.com/products/?sec=0&pid=269]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-3048 | http://www.dlink.com/products/?sec=0&pid=496]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3228PA | http://www.dlink.com/products/?sec=0&pid=644]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3028 | http://www.dlink.com/products/?sec=0&pid=630]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3028P | http://www.dlink.com/products/?sec=0&pid=631]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3052 | http://www.dlink.com/products/?sec=0&pid=632]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3052P | http://www.dlink.com/products/?sec=0&pid=633]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3010FA | http://www.dlink.com/products/?sec=0&pid=423]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3010GA | http://www.dlink.com/products/?sec=0&pid=424]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3010PA | http://www.dlink.com/products/?sec=0&pid=469]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3226L | http://www.dlink.com/products/?sec=0&pid=298]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3526 | http://www.dlink.com/products/?sec=0&pid=330]]');
-                       $new_words[] = array (12 => '[[D-Link DES-3550 | http://www.dlink.com/products/?sec=0&pid=331]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-1216T | http://www.dlink.com/products/?sec=0&pid=324]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-1224T | http://www.dlink.com/products/?sec=0&pid=329]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-1248T | http://www.dlink.com/products/?sec=0&pid=367]]');
-                       $new_words[] = array (12 => '[[D-Link DES-1316 | http://www.dlink.com/products/?sec=0&pid=353]]');
-                       $new_words[] = array (12 => '[[D-Link DES-1228 | http://www.dlink.com/products/?sec=0&pid=540]]');
-                       $new_words[] = array (12 => '[[D-Link DES-1228P | http://www.dlink.com/products/?sec=0&pid=541]]');
-                       $new_words[] = array (12 => '[[D-Link DES-1252 | http://www.dlink.com/products/?sec=0&pid=555]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-1016D | http://www.dlink.com/products/?sec=0&pid=337]]');
-                       $new_words[] = array (12 => '[[D-Link DGS-1024D | http://www.dlink.com/products/?sec=0&pid=338]]');
-                       $new_words[] = array (12 => '[[D-Link DSS-24+ | http://www.dlink.com/products/?sec=0&pid=73]]');
-                       $new_words[] = array (12 => '[[D-Link DES-1024D | http://www.dlink.com/products/?sec=0&pid=75]]');
-                       $new_words[] = array (12 => '[[D-Link DES-1026G | http://www.dlink.com/products/?sec=0&pid=76]]');
-                       $new_words[] = array (21 => '[[D-Link DKVM-16 | http://www.dlink.com/products/?sec=0&pid=228]]');
-                       $new_words[] = array (21 => '[[D-Link DKVM-8E | http://www.dlink.com/products/?sec=0&pid=161]]');
-                       $new_words[] = array (22 => '[[Raisecom RC702 | http://www.raisecom-international.com/p/RC702.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC702-GE | http://www.raisecom-international.com/p/RC702GE.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom ISCOM4300 | http://www.raisecom-international.com/p/ISCOM4300.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC953-FE4E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC953-FX4E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC953-FE8E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC953-FX8E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC953-8FE16E1 | http://www.raisecom-international.com/p/RC9538FE16E1.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC953E-3FE16E1 | http://www.raisecom-international.com/p/RC953E-3FE16E1.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC953-GESTM1 | http://www.raisecom-international.com/p/RC957.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom OPCOM3100-155 | http://www.raisecom-international.com/p/OPCOM3100.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom OPCOM3101-155 | http://www.raisecom-international.com/p/OPCOM3101.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC831-120 | http://www.raisecom-international.com/p/RC831.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC831-120-BL | http://www.raisecom-international.com/p/RC831.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC831-240 | http://www.raisecom-international.com/p/RC831.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC831-240E | http://www.raisecom-international.com/p/RC831.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2801-480GE-BL | http://www.raisecom-international.com/p/RCMS280X.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2801-120FE | http://www.raisecom-international.com/p/RCMS2801.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2801-120FE-BL | http://www.raisecom-international.com/p/RCMS2801.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2801-240FE | http://www.raisecom-international.com/p/RCMS2801.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2801-240FE-BL | http://www.raisecom-international.com/p/RCMS2801.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2801-240EFE | http://www.raisecom-international.com/p/RCMS2801.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2811-120FE | http://www.raisecom-international.com/p/RCMS2811.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2811-240FE | http://www.raisecom-international.com/p/RCMS2811.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2811-240FE-BL | http://www.raisecom-international.com/p/RCMS2811.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2811-480FE | http://www.raisecom-international.com/p/RCMS2811.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2811-480FE-BL | http://www.raisecom-international.com/p/RCMS2811.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2811-240EFE | http://www.raisecom-international.com/p/RCMS2811-240EFE.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2104-120 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2304-120 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2504-120 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2104-240 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2304-240 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RCMS2504-240 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC801-120B | http://www.raisecom-international.com/p/RC800120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC801-240B | http://www.raisecom-international.com/p/RC800120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC801-480B | http://www.raisecom-international.com/p/RC800120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC803-120B | http://www.raisecom-international.com/p/RC800120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC803-240B | http://www.raisecom-international.com/p/RC800120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC803-480B | http://www.raisecom-international.com/p/RC800120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC805-120B | http://www.raisecom-international.com/p/RC800120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC805-240B | http://www.raisecom-international.com/p/RC800120.htm]]');
-                       $new_words[] = array (22 => '[[Raisecom RC805-480B | http://www.raisecom-international.com/p/RC800120.htm]]');
+               case '0.15.0':
+                       $new_words[541] = array (12 => '[[Force10%GPASS%S2410CP | http://www.force10networks.com/products/s2410.asp]]');
+                       $new_words[] = array (12 => '[[Force10%GPASS%S50N | http://www.force10networks.com/products/s50n.asp]]');
+                       $new_words[] = array (12 => '[[Force10%GPASS%S50V | http://www.force10networks.com/products/s50v.asp]]');
+                       $new_words[] = array (12 => '[[Force10%GPASS%S25P | http://www.force10networks.com/products/s25p.asp]]');
+                       $new_words[] = array (12 => '[[Force10%GPASS%C150| http://www.force10networks.com/products/cseries.asp]]');
+                       $new_words[] = array (12 => '[[Force10%GPASS%C300| http://www.force10networks.com/products/cseries.asp]]');
+                       $new_words[] = array (12 => '[[Force10%GPASS%E300 | http://www.force10networks.com/products/eseries.asp]]');
+                       $new_words[] = array (12 => '[[Force10%GPASS%E600 | http://www.force10networks.com/products/eseries.asp]]');
+                       $new_words[] = array (12 => '[[Force10%GPASS%E1200 | http://www.force10networks.com/products/eseries.asp]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%JGS524F | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JGS524F.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%JGS516 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JGS516.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%JFS524 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JFS524.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%JFS524F | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JFS524F.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%JGS524 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JGS524.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FS524 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/FS524.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%JFS516 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JFS516.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7224R | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7224R.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7248 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7248.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7212 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7212.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM726S | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/FSM726S.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7248R | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7248R.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7224 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7224.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM750S | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/FSM750S.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM726 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/FSM726.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GS724TP | http://www.netgear.com/Products/Switches/SmartSwitches/GS724TP.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GS748TS | http://www.netgear.com/Products/Switches/SmartSwitches/GS748TS.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GS724T | http://www.netgear.com/Products/Switches/SmartSwitches/GS724T.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FS728TP | http://www.netgear.com/Products/Switches/SmartSwitches/FS728TP.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FS752TS | http://www.netgear.com/Products/Switches/SmartSwitches/FS752TS.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FS728TS | http://www.netgear.com/Products/Switches/SmartSwitches/FS728TS.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FS726T | http://www.netgear.com/Products/Switches/SmartSwitches/FS726T.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GS748TP | http://www.netgear.com/Products/Switches/SmartSwitches/GS748TP.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GS724TS | http://www.netgear.com/Products/Switches/SmartSwitches/GS724TS.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GS748T | http://www.netgear.com/Products/Switches/SmartSwitches/GS748T.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GS716T | http://www.netgear.com/Products/Switches/SmartSwitches/GS716T.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FS752TPS | http://www.netgear.com/Products/Switches/SmartSwitches/FS752TPS.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FS750T2 | http://www.netgear.com/Products/Switches/SmartSwitches/FS750T2.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FS726TP | http://www.netgear.com/Products/Switches/SmartSwitches/FS726TP.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7328PS | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7328PS.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7352S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7352S.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7324 | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7324.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7326P | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7326P.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7352PS | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7352PS.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7328FS | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7328FS.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7328S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7328S.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7312 | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7312.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7328S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7328S.aspx]]');
+                       $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7352S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7352S.aspx]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-6500 | http://www.dlink.com/products/?sec=0&pid=341]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DWS-3227 | http://www.dlink.com/products/?sec=0&pid=506]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DWS-3227P | http://www.dlink.com/products/?sec=0&pid=507]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DWS-3250 | http://www.dlink.com/products/?sec=0&pid=468]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DWS-1008 | http://www.dlink.com/products/?sec=0&pid=434]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3612G | http://www.dlink.com/products/?sec=0&pid=557]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3627 | http://www.dlink.com/products/?sec=0&pid=639]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3650 | http://www.dlink.com/products/?sec=0&pid=640]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3324SR | http://www.dlink.com/products/?sec=0&pid=294]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3324SRi | http://www.dlink.com/products/?sec=0&pid=309]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3326GSR | http://www.dlink.com/products/?sec=0&pid=339]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3350SR | http://www.dlink.com/products/?sec=0&pid=340]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3828 | http://www.dlink.com/products/?sec=0&pid=439]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3828P | http://www.dlink.com/products/?sec=0&pid=440]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3100-24 | http://www.dlink.com/products/?sec=0&pid=635]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3100-24P | http://www.dlink.com/products/?sec=0&pid=636]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3100-48 | http://www.dlink.com/products/?sec=0&pid=637]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3100-48P | http://www.dlink.com/products/?sec=0&pid=638]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3227 | http://www.dlink.com/products/?sec=0&pid=483]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3227P | http://www.dlink.com/products/?sec=0&pid=497]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3250 | http://www.dlink.com/products/?sec=0&pid=443]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3024 | http://www.dlink.com/products/?sec=0&pid=404]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3224TGR | http://www.dlink.com/products/?sec=0&pid=269]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3048 | http://www.dlink.com/products/?sec=0&pid=496]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3228PA | http://www.dlink.com/products/?sec=0&pid=644]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3028 | http://www.dlink.com/products/?sec=0&pid=630]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3028P | http://www.dlink.com/products/?sec=0&pid=631]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3052 | http://www.dlink.com/products/?sec=0&pid=632]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3052P | http://www.dlink.com/products/?sec=0&pid=633]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3010FA | http://www.dlink.com/products/?sec=0&pid=423]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3010GA | http://www.dlink.com/products/?sec=0&pid=424]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3010PA | http://www.dlink.com/products/?sec=0&pid=469]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3226L | http://www.dlink.com/products/?sec=0&pid=298]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3526 | http://www.dlink.com/products/?sec=0&pid=330]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-3550 | http://www.dlink.com/products/?sec=0&pid=331]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1216T | http://www.dlink.com/products/?sec=0&pid=324]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1224T | http://www.dlink.com/products/?sec=0&pid=329]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1248T | http://www.dlink.com/products/?sec=0&pid=367]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-1316 | http://www.dlink.com/products/?sec=0&pid=353]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-1228 | http://www.dlink.com/products/?sec=0&pid=540]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-1228P | http://www.dlink.com/products/?sec=0&pid=541]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-1252 | http://www.dlink.com/products/?sec=0&pid=555]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1016D | http://www.dlink.com/products/?sec=0&pid=337]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1024D | http://www.dlink.com/products/?sec=0&pid=338]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DSS-24+ | http://www.dlink.com/products/?sec=0&pid=73]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-1024D | http://www.dlink.com/products/?sec=0&pid=75]]');
+                       $new_words[] = array (12 => '[[D-Link%GPASS%DES-1026G | http://www.dlink.com/products/?sec=0&pid=76]]');
+                       $new_words[] = array (21 => '[[D-Link%GPASS%DKVM-16 | http://www.dlink.com/products/?sec=0&pid=228]]');
+                       $new_words[] = array (21 => '[[D-Link%GPASS%DKVM-8E | http://www.dlink.com/products/?sec=0&pid=161]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC702 | http://www.raisecom-international.com/p/RC702.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC702-GE | http://www.raisecom-international.com/p/RC702GE.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%ISCOM4300 | http://www.raisecom-international.com/p/ISCOM4300.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-FE4E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-FX4E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-FE8E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-FX8E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-8FE16E1 | http://www.raisecom-international.com/p/RC9538FE16E1.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC953E-3FE16E1 | http://www.raisecom-international.com/p/RC953E-3FE16E1.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-GESTM1 | http://www.raisecom-international.com/p/RC957.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%OPCOM3100-155 | http://www.raisecom-international.com/p/OPCOM3100.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%OPCOM3101-155 | http://www.raisecom-international.com/p/OPCOM3101.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC831-120 | http://www.raisecom-international.com/p/RC831.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC831-120-BL | http://www.raisecom-international.com/p/RC831.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC831-240 | http://www.raisecom-international.com/p/RC831.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC831-240E | http://www.raisecom-international.com/p/RC831.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-480GE-BL | http://www.raisecom-international.com/p/RCMS280X.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-120FE | http://www.raisecom-international.com/p/RCMS2801.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-120FE-BL | http://www.raisecom-international.com/p/RCMS2801.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-240FE | http://www.raisecom-international.com/p/RCMS2801.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-240FE-BL | http://www.raisecom-international.com/p/RCMS2801.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-240EFE | http://www.raisecom-international.com/p/RCMS2801.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-120FE | http://www.raisecom-international.com/p/RCMS2811.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-240FE | http://www.raisecom-international.com/p/RCMS2811.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-240FE-BL | http://www.raisecom-international.com/p/RCMS2811.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-480FE | http://www.raisecom-international.com/p/RCMS2811.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-480FE-BL | http://www.raisecom-international.com/p/RCMS2811.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-240EFE | http://www.raisecom-international.com/p/RCMS2811-240EFE.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2104-120 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2304-120 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2504-120 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2104-240 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2304-240 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2504-240 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC801-120B | http://www.raisecom-international.com/p/RC800120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC801-240B | http://www.raisecom-international.com/p/RC800120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC801-480B | http://www.raisecom-international.com/p/RC800120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC803-120B | http://www.raisecom-international.com/p/RC800120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC803-240B | http://www.raisecom-international.com/p/RC800120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC803-480B | http://www.raisecom-international.com/p/RC800120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC805-120B | http://www.raisecom-international.com/p/RC800120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC805-240B | http://www.raisecom-international.com/p/RC800120.htm]]');
+                       $new_words[] = array (22 => '[[Raisecom%GPASS%RC805-480B | http://www.raisecom-international.com/p/RC800120.htm]]');
                        $new_words[] = array (2 => 'async serial (DB-9)');  // 681
                        $new_words[] = array (2 => 'async serial (DB-25)'); // 682
-                       $new_words[] = array (12 => '[[Force10 S2410P | http://www.force10networks.com/products/s2410.asp]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X150-24t | http://www.extremenetworks.com/products/summit-x150.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X150-48t | http://www.extremenetworks.com/products/summit-x150.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X150-24p | http://www.extremenetworks.com/products/summit-x150.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X250e-24t | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X250e-48t | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X250e-24p | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X250e-48p | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X250e-24x | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X450-24t | http://www.extremenetworks.com/products/summit-x450.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X450-24x | http://www.extremenetworks.com/products/summit-x450.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X450a-24t | http://www.extremenetworks.com/products/summit-x450a.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X450a-48t | http://www.extremenetworks.com/products/summit-x450a.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X450a-24x | http://www.extremenetworks.com/products/summit-x450a.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X450e-24p | http://www.extremenetworks.com/products/summit-x450e.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit X450e-48p | http://www.extremenetworks.com/products/summit-x450e.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit 200-24fx | http://www.extremenetworks.com/products/summit-200.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit 200-24 | http://www.extremenetworks.com/products/summit-200.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit 200-48 | http://www.extremenetworks.com/products/summit-200.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit 300-24 | http://www.extremenetworks.com/products/summit-300.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit 300-48 | http://www.extremenetworks.com/products/summit-300.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit 400-24p | http://www.extremenetworks.com/products/summit-400-24p.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit 400-24t | http://www.extremenetworks.com/products/summit-400-24t.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit 400-48t | http://www.extremenetworks.com/products/summit-400-48t.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Summit48si | http://www.extremenetworks.com/products/summit-48si.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Alpine 3804 | http://www.extremenetworks.com/products/Alpine-3800.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks Alpine 3808 | http://www.extremenetworks.com/products/Alpine-3800.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks BlackDiamond 6808 | http://www.extremenetworks.com/products/blackdiamond-6800.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks BlackDiamond 8806 | http://www.extremenetworks.com/products/blackdiamond-8800.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks BlackDiamond 8810 | http://www.extremenetworks.com/products/blackdiamond-8800.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks BlackDiamond 10808 | http://www.extremenetworks.com/products/blackdiamond-10808.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks BlackDiamond 12802R | http://www.extremenetworks.com/products/blackdiamond-12800r.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks BlackDiamond 12804R | http://www.extremenetworks.com/products/blackdiamond-12800r.aspx]]');
-                       $new_words[] = array (12 => '[[Extreme Networks BlackDiamond 12804C | http://www.extremenetworks.com/products/blackdiamond-12804c.aspx]]');
-                       $new_words[] = array (17 => '[[Cisco ASR 1002 | http://cisco.com/en/US/products/ps9436/index.html]]');
-                       $new_words[] = array (17 => '[[Cisco ASR 1004 | http://cisco.com/en/US/products/ps9437/index.html]]');
-                       $new_words[] = array (17 => '[[Cisco ASR 1006 | http://cisco.com/en/US/products/ps9438/index.html]]');
-                       $query[] = "update Dictionary set dict_value = 'async serial (RJ-45)' where dict_key = 29";
+                       $new_words[] = array (12 => '[[Force10%GPASS%S2410P | http://www.force10networks.com/products/s2410.asp]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X150-24t | http://www.extremenetworks.com/products/summit-x150.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X150-48t | http://www.extremenetworks.com/products/summit-x150.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X150-24p | http://www.extremenetworks.com/products/summit-x150.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-24t | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-48t | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-24p | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-48p | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-24x | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450-24t | http://www.extremenetworks.com/products/summit-x450.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450-24x | http://www.extremenetworks.com/products/summit-x450.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450a-24t | http://www.extremenetworks.com/products/summit-x450a.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450a-48t | http://www.extremenetworks.com/products/summit-x450a.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450a-24x | http://www.extremenetworks.com/products/summit-x450a.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450e-24p | http://www.extremenetworks.com/products/summit-x450e.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450e-48p | http://www.extremenetworks.com/products/summit-x450e.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 200-24fx | http://www.extremenetworks.com/products/summit-200.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 200-24 | http://www.extremenetworks.com/products/summit-200.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 200-48 | http://www.extremenetworks.com/products/summit-200.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 300-24 | http://www.extremenetworks.com/products/summit-300.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 300-48 | http://www.extremenetworks.com/products/summit-300.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 400-24p | http://www.extremenetworks.com/products/summit-400-24p.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 400-24t | http://www.extremenetworks.com/products/summit-400-24t.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 400-48t | http://www.extremenetworks.com/products/summit-400-48t.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit48si | http://www.extremenetworks.com/products/summit-48si.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Alpine 3804 | http://www.extremenetworks.com/products/Alpine-3800.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%Alpine 3808 | http://www.extremenetworks.com/products/Alpine-3800.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 6808 | http://www.extremenetworks.com/products/blackdiamond-6800.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 8806 | http://www.extremenetworks.com/products/blackdiamond-8800.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 8810 | http://www.extremenetworks.com/products/blackdiamond-8800.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 10808 | http://www.extremenetworks.com/products/blackdiamond-10808.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 12802R | http://www.extremenetworks.com/products/blackdiamond-12800r.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 12804R | http://www.extremenetworks.com/products/blackdiamond-12800r.aspx]]');
+                       $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 12804C | http://www.extremenetworks.com/products/blackdiamond-12804c.aspx]]');
+                       $new_words[] = array (17 => '[[Cisco%GPASS%ASR 1002 | http://cisco.com/en/US/products/ps9436/index.html]]');
+                       $new_words[] = array (17 => '[[Cisco%GPASS%ASR 1004 | http://cisco.com/en/US/products/ps9437/index.html]]');
+                       $new_words[] = array (17 => '[[Cisco%GPASS%ASR 1006 | http://cisco.com/en/US/products/ps9438/index.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.3 | http://openbsd.org/33.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.4 | http://openbsd.org/34.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.5 | http://openbsd.org/35.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.6 | http://openbsd.org/36.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.7 | http://openbsd.org/37.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.8 | http://openbsd.org/38.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.9 | http://openbsd.org/39.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 4.0 | http://openbsd.org/40.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 4.1 | http://openbsd.org/41.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 4.2 | http://openbsd.org/42.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 4.3 | http://openbsd.org/43.html]]');
+                       $new_words[] = array (12 => '[[Cisco Catalyst 4900M | http://www.cisco.com/en/US/products/ps9310/index.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%FreeBSD 7.x | http://www.freebsd.org/releases/7.0R/announce.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 2.0 | http://netbsd.org/releases/formal-2.0/]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 2.1 | http://netbsd.org/releases/formal-2.0/NetBSD-2.1.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 3.0 | http://netbsd.org/releases/formal-3/]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 3.1 | http://netbsd.org/releases/formal-3/NetBSD-3.1.html]]');
+                       $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 4.0 | http://netbsd.org/releases/formal-4/NetBSD-4.0.html]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2016 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16470B]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2024 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16471B]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2126-G | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16472]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2816 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16478]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2824 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16479]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2226 Plus | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16475CS]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2426-PWR Plus | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16491]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2250 Plus | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16476CS]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2916-SFP Plus | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CBLSG16]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2924-SFP Plus | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CBLSG24]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2924-PWR Plus | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CBLSG24PWR]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2948-SFP Plus | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CBLSG48]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%3870 24-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17450-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%3870 48-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17451-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4200 26-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17300A&pathtype=purchase]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4200 28-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17304A&pathtype=purchase]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4200 50-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17302A&pathtype=purchase]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4200G 12-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3CR17660-91&pathtype=purchase]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4200G 24-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3CR17661-91&pathtype=purchase]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4200G PWR 24-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3CR17671-91&pathtype=purchase]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4200G 48-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3CR17662-91&pathtype=purchase]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4210 26-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17333-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4210 52-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17334-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4210 26-port PWR | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17343-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%SS3 4400 48-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C17204-US]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%SS3 4400 24-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C17203-US]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%SS3 4400 PWR | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C17205-US]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%SS3 4400 SE 24-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C17206-US]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4500 26-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17561-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4500 50-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17562-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4500 PWR 26-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17571-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4500 PWR 50-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17572-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4500G 24-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17761-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4500G 48-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17762-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4500G PWR 24-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17771-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%4500G PWR 48-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17772-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500-EI 28-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17161-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500-EI 52-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17162-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500-EI 28-port PWR | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17171-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500-EI 52-port PWR | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17172-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500-EI 28-port FX | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17181-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500G-EI 24-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17250-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500G-EI 48-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17251-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500G-EI PWR 24-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17252-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500G-EI 48-port PWR | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17253-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%5500G-EI 24-port SFP | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3CR17258-91]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%7754 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16894]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%7757 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16895]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%7758 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16896]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%8807 | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17502A&pathtype=purchase]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%8810 | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17501A&pathtype=purchase]]');
+                       $new_words[] = array (12 => '[[3Com%GPASS%8814 | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17500A&pathtype=purchase]]');
+                       $new_words[] = array (13 => 'Linux%GSKIP%RHF9');
                        $query[] = "insert into PortCompat (type1, type2) values (29, 681)";
                        $query[] = "insert into PortCompat (type1, type2) values (29, 682)";
                        $query[] = "insert into PortCompat (type1, type2) values (681, 29)";
@@ -987,10 +1085,12 @@ CREATE TABLE `IPVirtualService` (
                        $query[] = "insert into PortCompat (type1, type2) values (682, 682)";
                        $query[] =
 "
-CREATE TABLE `RackObjectTags` (
-  `object_id` int(10) unsigned default NULL,
+CREATE TABLE `TagStorage` (
+  `target_realm` enum('object','ipv4net','rack','ipv4vs','ipv4rspool') NOT NULL default 'object',
+  `target_id` int(10) unsigned NOT NULL,
   `tag_id` int(10) unsigned default NULL,
-  KEY `object_id` (`object_id`)
+  UNIQUE KEY `entity_tag` (`target_realm`,`target_id`,`tag_id`),
+  KEY `target_id` (`target_id`)
 ) TYPE=MyISAM;
 ";
                        $query[] =
@@ -1003,19 +1103,320 @@ CREATE TABLE `TagTree` (
   UNIQUE KEY `tag` (`tag`)
 ) TYPE=MyISAM;
 ";
+                       $old_words[29] = 'async serial (RJ-45)';
+
+                       $old_words[43] = 'IBM xSeries%GPASS%305';
+                       $old_words[44] = 'IBM xSeries%GPASS%306';
+                       $old_words[45] = 'IBM xSeries%GPASS%306m';
+                       $old_words[46] = 'IBM xSeries%GPASS%326m';
+                       $old_words[47] = 'IBM xSeries%GPASS%330';
+                       $old_words[48] = 'IBM xSeries%GPASS%335';
+                       $old_words[54] = 'IBM xSeries%GPASS%346';
+                       $old_words[59] = 'IBM xSeries%GPASS%326';
+                       $old_words[68] = 'IBM xSeries%GPASS%3250';
+                       $old_words[69] = 'IBM xSeries%GPASS%3455';
+                       $old_words[70] = 'IBM xSeries%GPASS%3550';
+                       $old_words[71] = 'IBM xSeries%GPASS%3650';
+                       $old_words[72] = 'IBM xSeries%GPASS%3655';
+                       $old_words[73] = 'IBM xSeries%GPASS%3650 T';
+                       $old_words[74] = 'IBM xSeries%GPASS%3755';
+                       $old_words[75] = 'IBM xSeries%GPASS%3850';
+
+                       $old_words[92] = 'IBM pSeries%GPASS%185';
+                       $old_words[93] = 'IBM pSeries%GPASS%505';
+                       $old_words[94] = 'IBM pSeries%GPASS%505Q';
+                       $old_words[95] = 'IBM pSeries%GPASS%510';
+                       $old_words[96] = 'IBM pSeries%GPASS%510Q';
+                       $old_words[97] = 'IBM pSeries%GPASS%520';
+                       $old_words[98] = 'IBM pSeries%GPASS%520Q';
+                       $old_words[99] = 'IBM pSeries%GPASS%550';
+                       $old_words[100] = 'IBM pSeries%GPASS%550Q';
+
+                       $old_words[212] = 'Linux%GSKIP%RHFC1';
+                       $old_words[213] = 'Linux%GSKIP%RHFC2';
+                       $old_words[214] = 'Linux%GSKIP%RHFC3';
+                       $old_words[215] = 'Linux%GSKIP%RHFC4';
+                       $old_words[216] = 'Linux%GSKIP%RHFC5';
+                       $old_words[217] = 'Linux%GSKIP%RHFC6';
+                       $old_words[232] = 'Linux%GSKIP%RHF7';
+                       $old_words[242] = 'Linux%GSKIP%RHF8';
+                       $old_words[225] = 'Linux%GSKIP%RHEL1';
+                       $old_words[226] = 'Linux%GSKIP%RHEL2';
+                       $old_words[227] = 'Linux%GSKIP%RHEL3';
+                       $old_words[228] = 'Linux%GSKIP%RHEL4';
+                       $old_words[436] = 'Linux%GSKIP%RHEL5';
+
+                       $old_words[229] = 'Linux%GSKIP%ALTLinux Master 2.0';
+                       $old_words[230] = 'Linux%GSKIP%ALTLinux Master 2.2';
+                       $old_words[231] = 'Linux%GSKIP%ALTLinux Master 2.4';
+                       $old_words[243] = 'Linux%GSKIP%ALTLinux Master 4.0';
+                       $old_words[231] = 'Linux%GSKIP%ALTLinux Master 2.4';
+                       $old_words[422] = 'Linux%GSKIP%ALTLinux Server 4.0';
+                       $old_words[423] = 'Linux%GSKIP%ALTLinux Sisyphus';
+
+                       $old_words[233] = 'Linux%GSKIP%SLES10';
+                       $old_words[424] = 'Linux%GSKIP%openSUSE 10.0';
+                       $old_words[425] = 'Linux%GSKIP%openSUSE 10.1';
+                       $old_words[426] = 'Linux%GSKIP%openSUSE 10.2';
+                       $old_words[427] = 'Linux%GSKIP%openSUSE 10.3';
+
+                       $old_words[428] = 'Linux%GSKIP%Ubuntu 4.10';
+                       $old_words[429] = 'Linux%GSKIP%Ubuntu 5.04';
+                       $old_words[430] = 'Linux%GSKIP%Ubuntu 5.10';
+                       $old_words[431] = 'Linux%GSKIP%Ubuntu 6.06 LTS';
+                       $old_words[432] = 'Linux%GSKIP%Ubuntu 6.10';
+                       $old_words[433] = 'Linux%GSKIP%Ubuntu 7.04';
+                       $old_words[434] = 'Linux%GSKIP%Ubuntu 7.10';
+                       $old_words[435] = 'Linux%GSKIP%Ubuntu 8.04 LTS';
+
+                       $old_words[418] = 'Linux%GSKIP%Debian 2.0 (hamm)';
+                       $old_words[419] = 'Linux%GSKIP%Debian 2.1 (slink)';
+                       $old_words[420] = 'Linux%GSKIP%Debian 2.2 (potato)';
+                       $old_words[234] = 'Linux%GSKIP%Debian 3.0 (woody)';
+                       $old_words[235] = 'Linux%GSKIP%Debian 3.1 (sarge)';
+                       $old_words[421] = 'Linux%GSKIP%Debian 4.0 (etch)';
+
+                       $old_words[236] = 'BSD%GSKIP%FreeBSD 1.x';
+                       $old_words[237] = 'BSD%GSKIP%FreeBSD 2.x';
+                       $old_words[238] = 'BSD%GSKIP%FreeBSD 3.x';
+                       $old_words[239] = 'BSD%GSKIP%FreeBSD 4.x';
+                       $old_words[240] = 'BSD%GSKIP%FreeBSD 5.x';
+                       $old_words[241] = 'BSD%GSKIP%FreeBSD 6.x';
+                       $old_words[732] = '[[BSD%GSKIP%FreeBSD 7.0 | http://www.freebsd.org/releases/7.0R/announce.html]]';
+
+                       $old_words[441] = 'Linux%GSKIP%CentOS-2';
+                       $old_words[442] = 'Linux%GSKIP%CentOS-3';
+                       $old_words[443] = 'Linux%GSKIP%CentOS-4';
+                       $old_words[444] = 'Linux%GSKIP%CentOS-5';
+
+                       $old_words[218] = 'BSD%GSKIP%Solaris 8';
+                       $old_words[219] = 'BSD%GSKIP%Solaris 9';
+                       $old_words[220] = 'BSD%GSKIP%Solaris 10';
+
+                       $old_words[49] = 'Sun%GPASS%Ultra 10';
+                       $old_words[50] = 'Sun%GPASS%Enterprise 420R';
+                       $old_words[51] = '[[Sun%GPASS%Fire X2100 | http://www.sun.com/servers/entry/x2100/]]';
+                       $old_words[52] = '[[Sun%GPASS%Fire E4900 | http://www.sun.com/servers/midrange/sunfire_e4900/index.xml]]';
+                       $old_words[53] = 'Sun%GPASS%Netra X1';
+                       $old_words[57] = 'Sun%GPASS%Fire V210';
+                       $old_words[58] = 'Sun%GPASS%Fire V240';
+                       $old_words[60] = 'Sun%GPASS%Netra t1 105';
+                       $old_words[61] = 'Sun%GPASS%Enterprise 4500';
+                       $old_words[64] = 'Sun%GPASS%Ultra 5';
+                       $old_words[76] = '[[Sun%GPASS%Fire X4600 | http://www.sun.com/servers/x64/x4600/]]';
+                       $old_words[77] = '[[Sun%GPASS%Fire X4500 | http://www.sun.com/servers/x64/x4500/]]';
+                       $old_words[78] = '[[Sun%GPASS%Fire X4200 | http://www.sun.com/servers/entry/x4200/]]';
+                       $old_words[79] = '[[Sun%GPASS%Fire X4100 | http://www.sun.com/servers/entry/x4100/]]';
+                       $old_words[80] = '[[Sun%GPASS%Fire X2100 M2 | http://www.sun.com/servers/entry/x2100/]]';
+                       $old_words[81] = '[[Sun%GPASS%Fire X2200 M2 | http://www.sun.com/servers/x64/x2200/]]';
+                       $old_words[82] = 'Sun%GPASS%Fire V40z';
+                       $old_words[83] = 'Sun%GPASS%Fire V125';
+                       $old_words[84] = '[[Sun%GPASS%Fire V215 | http://www.sun.com/servers/entry/v215/]]';
+                       $old_words[85] = '[[Sun%GPASS%Fire V245 | http://www.sun.com/servers/entry/v245/]]';
+                       $old_words[86] = '[[Sun%GPASS%Fire V445 | http://www.sun.com/servers/entry/v445/]]';
+                       $old_words[87] = 'Sun%GPASS%Fire V440';
+                       $old_words[88] = '[[Sun%GPASS%Fire V490 | http://www.sun.com/servers/midrange/v490/]]';
+                       $old_words[89] = '[[Sun%GPASS%Fire V890 | http://www.sun.com/servers/midrange/v890/]]';
+                       $old_words[90] = '[[Sun%GPASS%Fire E2900 | http://www.sun.com/servers/midrange/sunfire_e2900/index.xml]]';
+                       $old_words[91] = 'Sun%GPASS%Fire V1280';
+
+                       $old_words[55] = 'Dell PowerEdge%GPASS%1650';
+                       $old_words[56] = 'Dell PowerEdge%GPASS%2850';
+                       $old_words[62] = 'Dell PowerEdge%GPASS%1950';
+                       $old_words[63] = 'Dell PowerEdge%GPASS%1550';
+                       $old_words[65] = 'Dell PowerEdge%GPASS%2950';
+                       $old_words[66] = 'Dell PowerEdge%GPASS%650';
+                       $old_words[67] = 'Dell PowerEdge%GPASS%4600';
+                       $old_words[355] = 'Dell PowerEdge%GPASS%6850';
+                       $old_words[356] = 'Dell PowerEdge%GPASS%6950';
+                       $old_words[357] = 'Dell PowerEdge%GPASS%R900';
+                       $old_words[358] = 'Dell PowerEdge%GPASS%4400';
+                       $old_words[359] = 'Dell PowerEdge%GPASS%2650';
+                       $old_words[360] = 'Dell PowerEdge%GPASS%2550';
+                       $old_words[361] = 'Dell PowerEdge%GPASS%750';
+                       $old_words[362] = 'Dell PowerEdge%GPASS%2450';
+                       $old_words[363] = 'Dell PowerEdge%GPASS%850';
+                       $old_words[364] = 'Dell PowerEdge%GPASS%1850';
+                       $old_words[365] = 'Dell PowerEdge%GPASS%860';
+                       $old_words[366] = 'Dell PowerEdge%GPASS%2900';
+                       $old_words[367] = 'Dell PowerEdge%GPASS%2970';
+                       $old_words[368] = 'Dell PowerEdge%GPASS%SC1435';
+
+                       $old_words[101] = '[[HP ProLiant%GPASS%DL140 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-1842838.html]]';
+                       $old_words[102] = '[[HP ProLiant%GPASS%DL145 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3219755.html]]';
+                       $old_words[103] = '[[HP ProLiant%GPASS%DL320 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3201178.html]]';
+                       $old_words[104] = '[[HP ProLiant%GPASS%DL360 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-1121486.html]]';
+                       $old_words[105] = '[[HP ProLiant%GPASS%DL380 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-1121516.html]]';
+                       $old_words[106] = '[[HP ProLiant%GPASS%DL385 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3219233.html]]';
+                       $old_words[107] = '[[HP ProLiant%GPASS%DL580 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328422-3454575.html]]';
+                       $old_words[108] = '[[HP ProLiant%GPASS%DL585 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328422-3219717.html]]';
+                       $old_words[109] = '[[HP ProLiant%GPASS%ML110 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328424-3577708.html]]';
+                       $old_words[110] = '[[HP ProLiant%GPASS%ML150 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328424-3580609.html]]';
+                       $old_words[111] = '[[HP ProLiant%GPASS%ML310 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-241477-3580655.html]]';
+                       $old_words[112] = '[[HP ProLiant%GPASS%ML350 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-241477-1121586.html]]';
+                       $old_words[113] = '[[HP ProLiant%GPASS%ML370 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-241477-1121474.html]]';
+                       $old_words[114] = '[[HP ProLiant%GPASS%ML570 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328425-1842779.html]]';
+                       $old_words[534] = '[[HP ProLiant%GPASS%DL160 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3580694.html]]';
+                       $old_words[535] = '[[HP ProLiant%GPASS%DL180 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3580698.html]]';
+                       $old_words[536] = '[[HP ProLiant%GPASS%DL185 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3579900.html]]';
+                       $old_words[537] = '[[HP ProLiant%GPASS%DL365 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3186080.html]]';
+                       $old_words[538] = '[[HP ProLiant%GPASS%DL320s | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3232017.html]]';
+                       $old_words[539] = '[[HP ProLiant%GPASS%DL320p | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3579703.html]]';
+                       $old_words[540] = '[[HP ProLiant%GPASS%ML115 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328424-3330535.html]]';
+
                        foreach ($new_words as $dict_key => $tmp)
                                foreach ($tmp as $chapter_no => $dict_value)
                                        $query[] = 'INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) ' .
                                                "VALUES (${chapter_no}, ${dict_key}, '${dict_value}')";
-                       $query[] = "update Config set varvalue = '0.14.13' where varname = 'DB_VERSION'";
+                       foreach ($old_words as $dict_key => $dict_value)
+                               $query[] = "update Dictionary set dict_value = '${dict_value}' where dict_key = ${dict_key} limit 1";
+                       $query[] = "alter table Rack add unique name_in_row (row_id, name)";
+                       $query[] = "delete from UserPermission where page = 'help'";
+                       $query[] = "alter table Config change column varvalue varvalue char(255) NOT NULL";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('SHOW_EXPLICIT_TAGS','yes','string','no','no','Show explicit tags')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('SHOW_IMPLICIT_TAGS','yes','string','no','no','Show implicit tags')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('SHOW_AUTOMATIC_TAGS','no','string','no','no','Show automatic tags')";
+                       // Decommission the Protocols dictionary chapter.
+                       $query[] = "alter table PortForwarding add column proto_new enum('TCP','UDP') not null default 'TCP' after proto";
+                       $query[] = "update PortForwarding set proto_new = 'TCP' where proto = 336";
+                       $query[] = "update PortForwarding set proto_new = 'UDP' where proto = 337";
+                       $query[] = "alter table PortForwarding drop primary key";
+                       $query[] = "alter table PortForwarding drop column proto";
+                       $query[] = "alter table PortForwarding change column proto_new proto enum('TCP','UDP') not null default 'TCP'";
+                       $query[] = "alter table PortForwarding add primary key (`object_id`,`proto`,`localip`,`localport`,`remoteip`,`remoteport`)";
+                       $query[] = "delete from Dictionary where chapter_no = 20";
+                       $query[] = "delete from Chapter where chapter_no = 20";
+                       $query[] = "update Config set varvalue = '0.15.0' where varname = 'DB_VERSION'";
                        break; // --------------------------------------------
-#              case '0.14.14':
-#                      $query[] = "alter table Rack add column left_is_front enum ('yes', 'no') not null default 'yes' after height";
-#                      $query[] = "alter table Rack add column bottom_is_unit1 enum ('yes', 'no') not null default 'yes' after left_is_front";
-#                      $query[] = "update Config set varvalue = '0.14.14' where varname = 'DB_VERSION'";
-#                      break; // --------------------------------------------
+               case '0.15.1':
+                       $query[] = "INSERT INTO `Config` VALUES ('IPV4_AUTO_RELEASE','1','uint','no','no','Auto-release IPv4 addresses on allocation')";
+                       $query[] = "update Config set varvalue = '0.15.1' where varname = 'DB_VERSION'";
+                       break;
+               case '0.16.0':
+                       if (!defined ('MB_CASE_LOWER'))
+                       {
+                               die ('<b>Cannot upgrade due to multibyte extension not present. See the README for details.</b>');
+                       }
+                       $query[] = 'alter table TagStorage modify column tag_id int(10) unsigned not null;';
+                       $query[] = "alter table TagStorage modify column target_realm enum('object','ipv4net','rack','ipv4vs','ipv4rspool','user') NOT NULL default 'object'";
+                       $query[] = "create table Script (script_name char(64) not null primary key, script_text text)";
+                       // Do the same getUserPermissions() does, but without the function.
+                       // We need to generate more specific rules first, otherwise they will
+                       // never work.
+                       $tq =
+                               "select UserPermission.user_id, user_name, page, tab, access from " .
+                               "UserPermission natural left join UserAccount where (user_name is not null) or " .
+                               "(user_name is null and UserPermission.user_id = 0) order by user_id desc, page desc, tab desc";
+                       $tr = $dbxlink->query ($tq);
+                       $code = "allow {\$userid_1}\ndeny true\n";
+                       // copied and pasted from fixContext()
+                       $pmap = array
+                       (
+                               'accounts' => 'userlist',
+                               'rspools' => 'ipv4rsplist',
+                               'rspool' => 'ipv4rsp',
+                               'vservices' => 'ipv4vslist',
+                               'vservice' => 'ipv4vs',
+                       );
+                       $tmap = array();
+                       $tmap['objects']['newmulti'] = 'addmore';
+                       $tmap['objects']['newobj'] = 'addmore';
+                       $tmap['object']['switchvlans'] = 'livevlans';
+                       $tmap['object']['slb'] = 'editrspvs';
+                       $tmap['object']['portfwrd'] = 'nat4';
+                       $tmap['object']['network'] = 'ipv4';
+                       while ($row = $tr->fetch (PDO::FETCH_ASSOC))
+                       {
+                               // map, if appropriate
+                               $row['page'] = isset ($pmap[$row['page']]) ? $pmap[$row['page']] : $row['page'];
+                               $row['tab'] = isset ($tmap[$row['page']][$row['tab']]) ? $tmap[$row['page']][$row['tab']] : $row['tab'];
+                               // build a rule
+                               $conjunction = '';
+                               $rule = $row['access'] == 'yes' ? 'allow' : 'deny';
+                               if ($row['user_id'] != 0)
+                               {
+                                       $rule .= " {\$username_${row['user_name']}}";
+                                       $conjunction = 'and ';
+                               }
+                               if ($row['page'] != '%')
+                               {
+                                       $rule .= " ${conjunction}{\$page_${row['page']}}";
+                                       $conjunction = 'and ';
+                               }
+                               if ($row['tab'] != '%')
+                                       $rule .= " ${conjunction}{\$tab_${row['tab']}}";
+                               if ($rule == 'allow' or $rule == 'deny')
+                                       continue;
+                               $code .= "${rule}\n";
+                       }
+                       $query[] = "insert into Script (script_name, script_text) values ('RackCode', '${code}')";
+                       $query[] = 'drop table UserPermission';
+                       $new_words[791] = array (13 => '[[Linux%GSKIP%openSUSE 11.0 | http://en.opensuse.org/OpenSUSE_11.0]]');
+                       $new_words[] = array (11 => '[[SGI%GPASS%Altix XE250 | http://www.sgi.com/products/servers/altix/xe/configs.html]]');
+                       $new_words[] = array (11 => '[[SGI%GPASS%Altix XE310 | http://www.sgi.com/products/servers/altix/xe/configs.html]]');
+                       $new_words[] = array (11 => '[[SGI%GPASS%Altix XE320 | http://www.sgi.com/products/servers/altix/xe/configs.html]]');
+                       foreach ($new_words as $dict_key => $tmp)
+                               foreach ($tmp as $chapter_no => $dict_value)
+                                       $query[] = 'INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) ' .
+                                               "VALUES (${chapter_no}, ${dict_key}, '${dict_value}')";
+                       $query[] = "update Config set varvalue = '0.16.0' where varname = 'DB_VERSION'";
+                       break;
+               case '0.16.1':
+                       $query[] = 'alter table Script modify column script_text longtext';
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('SHOW_LAST_TAB','no','string','yes','no','Remember last tab shown for each page')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('COOKIE_TTL','1209600','uint','yes','no','Cookies lifetime in seconds')";
+                       $query[] = "update Config set varvalue = '0.16.1' where varname = 'DB_VERSION'";
+                       break;
+               case '0.16.2':
+                       $query[] = "alter table IPBonds modify column type enum('regular','shared','virtual','router')";
+                       $query[] = "update Dictionary set dict_value = 'spacer' where dict_key = 11";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('EXT_IPV4_VIEW','yes','string','no','no','Display parent network info for IPv4 addresses')";
+                       $query[] = "ALTER TABLE RackSpace ADD KEY `RackSpace_object_id` (`object_id`)";
+                       $query[] = "update Config set varvalue = '0.16.2' where varname = 'DB_VERSION'";
+                       break;
+               case '0.16.3':
+                       // The network table list used to allow duplicate "prefix-masklen" pairs, which was a bad idea.
+                       // The code, which verified each new network to be "unique", didn't work for "upper" IPv4 space.
+                       // To enable the relevant index now, it is necessary to process all ghost networks, which could
+                       // be accumulated over the time, and move all tags assigned to them to the "master" record, which
+                       // we recognize to be the one with the lowest ID.
+                       $q = 'select ip, mask, count(*) as c from IPRanges group by ip, mask having c > 1';
+                       $r = $dbxlink->query ($q);
+                       // Let's hope there's not many dupes, cause sub-queries won't work.
+                       $dupes = $r->fetchAll (PDO::FETCH_ASSOC);
+                       unset ($r);
+                       foreach ($dupes as $d)
+                       {
+                               $firstid = 0;
+                               $q = "select id from IPRanges where ip = ${d['ip']} and mask = ${d['mask']} order by id";
+                               $r = $dbxlink->query ($q);
+                               while ($row = $r->fetch (PDO::FETCH_ASSOC))
+                               {
+                                       if (!$firstid)
+                                       {
+                                               $firstid = $row['id'];
+                                               continue;
+                                       }
+                                       // Rewrite tags, but don't rebuild the chains. Let regular code sort it out.
+                                       // One of the next two queries will fail.
+                                       $query[] = "update TagStorage set target_id = ${firstid} where target_id = ${row['id']} and target_realm = 'ipv4net'";
+                                       $query[] = "delete from TagStorage where target_id = ${row['id']} and target_realm = 'ipv4net'";
+                                       $query[] = "delete from IPRanges where id = ${row['id']}";
+                               }
+                               unset ($r);
+                       }
+                       $query[] = 'alter table IPRanges add unique `base-len` (`ip`, `mask`)';
+                       $query[] = 'alter table IPVirtualService drop key `endpoint`';
+                       // fix the default value (only seen when upgrading from pre-0.16.0 to pre-0.16.3)
+                       $query[] = "alter table TagStorage modify column target_realm enum('object','ipv4net','rack','ipv4vs','ipv4rspool','user') NOT NULL default 'object'";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('TREE_THRESHOLD','25','uint','yes','no','Tree view auto-collapse threshold')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('IPV4_JAYWALK','no','string','no','no','Enable IPv4 address allocations w/o covering network')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('ADDNEW_AT_TOP','yes','string','no','no','Render \"add new\" line at top of the list')";
+                       $query[] = "update Config set description = 'Extended IPv4 view' where varname = 'EXT_IPV4_VIEW'";
+                       $query[] = "update Config set varvalue = '0.16.3' where varname = 'DB_VERSION'";
+                       break;
                default:
-                       showError ("executeUpgradeBatch () failed, because batch '${batchid}' isn't defined");
+                       showError ("executeUpgradeBatch () failed, because batch '${batchid}' isn't defined", __FILE__);
                        die;
                        break;
        }
@@ -1096,8 +1497,24 @@ catch (PDOException $e)
 // will have to dig into the DB for the user accounts.
 require_once 'inc/auth.php';
 
-// This will not fail sanely, because getUserAccounts() depends on showError()
-$accounts = getUserAccounts();
+// 1. This didn't fail sanely, because getUserAccounts() depended on showError()
+// 2. getUserAccounts() doesn't work for old DBs since 0.16.0. Let's have own
+// copy until it breaks too.
+
+function getUserAccounts_local ()
+{
+       global $dbxlink;
+       $query = 'select user_id, user_name, user_password_hash from UserAccount order by user_name';
+       if (($result = $dbxlink->query ($query)) == NULL)
+               die ('SQL query failed in ' . __FUNCTION__);
+       $ret = array();
+       while ($row = $result->fetch (PDO::FETCH_ASSOC))
+               foreach (array ('user_id', 'user_name', 'user_password_hash') as $cname)
+                       $ret[$row['user_name']][$cname] = $row[$cname];
+       return $ret;
+}
+
+$accounts = getUserAccounts_local();
 
 // Only administrator is always authenticated locally, so reject others
 // for authenticate() to succeed.
@@ -1112,22 +1529,25 @@ if
 {
        header ('WWW-Authenticate: Basic realm="RackTables upgrade"');
        header ('HTTP/1.0 401 Unauthorized');
-       showError ('You must be authenticated as an administrator to complete the upgrade.');
+       showError ('You must be authenticated as an administrator to complete the upgrade.', __FILE__);
        die;
 }
 
 $dbver = getDatabaseVersion();
-echo 'Code version == ' . CODE_VERSION;
-echo '<br>Database version == ' . $dbver;
+echo 'Code version: ' . CODE_VERSION . '<br>';
+echo 'Database version: ' . $dbver . '<br>';
 if ($dbver == CODE_VERSION)
 {
-       die ("<p align=justify>Your database seems to be up-to-date. " .
-               "Now the best thing to do would be to follow to the <a href='${root}'>main page</a> " .
-               "and explore your data. Have a nice day.</p>");
+       die ("<p align=justify>No action is necessary. " .
+               "Proceed to the <a href='${root}'>main page</a>, " .
+               "check your data and have a nice day.</p>");
 }
 
 foreach (getDBUpgradePath ($dbver, CODE_VERSION) as $batchid)
+{
        executeUpgradeBatch ($batchid);
+       printReleaseNotes ($batchid);
+}
 
 echo '<br>Database version == ' . getDatabaseVersion();
 echo "<p align=justify>Your database seems to be up-to-date. " .