r2034 + fixed tag name regexp once more
[racktables] / upgrade.php
CommitLineData
6dc745d2 1<?php
fbbb74fb
DO
2
3// At the moment we assume, that for any two releases we can
4// sequentally execute all batches, that separate them, and
5// nothing will break. If this changes one day, the function
6// below will have to generate smarter upgrade paths, while
7// the upper layer will remain the same.
8// Returning an empty array means that no upgrade is necessary.
9function getDBUpgradePath ($v1, $v2)
10{
a6f83a72
DO
11 $versionhistory = array
12 (
13 '0.14.4',
14 '0.14.5',
15 '0.14.6',
16 '0.14.7',
17 '0.14.8',
18 '0.14.9',
2ff234d6 19 '0.14.10',
2c53a252 20 '0.14.11',
86fc1740 21 '0.14.12',
3861eef6 22 '0.15.0',
fe782367
DO
23 '0.15.1',
24 '0.16.0',
a6f83a72 25 );
fbbb74fb
DO
26 if (!in_array ($v1, $versionhistory) || !in_array ($v2, $versionhistory))
27 {
28 showError ("An upgrade path has been requested for versions '${v1}' and '${v2}', " .
29 "and at least one of those isn't known to me.");
30 die;
31 }
32 $skip = TRUE;
33 $path = array();
34 // Now collect all versions > $v1 and <= $v2
35 foreach ($versionhistory as $v)
36 {
37 if ($v == $v1)
38 {
39 $skip = FALSE;
40 continue;
41 }
42 if ($skip)
43 continue;
44 $path[] = $v;
45 if ($v == $v2)
46 break;
47 }
48 return $path;
49}
50
51// Upgrade batches are name exactly as the release where they first appear.
52// That simple, but seems sufficient for beginning.
53function executeUpgradeBatch ($batchid)
54{
55 $query = array();
ce109ff2 56 global $dbxlink;
fbbb74fb
DO
57 switch ($batchid)
58 {
59 case '0.14.5':
60 // We can't realiably distinguish between 0.14.4 and 0.14.5, but
61 // luckily the SQL statements below can be safely executed for both.
62
63
64 // This has to be checked once more to be sure IPAddress allocation
65 // conventions are correct.
66 $query[] = "delete from IPAddress where name = '' and reserved = 'no'";
67
68 // In the 0.14.4 release we had AUTO_INCREMENT low in the dictionary and auth
69 // data tables, thus causing new user's data to take primary keys equal to
70 // the values of shipped data in future releases. Let's shift user's data
71 // up and keep DB consistent.
72 $query[] = "alter table Attribute AUTO_INCREMENT = 10000";
73 $query[] = "alter table Chapter AUTO_INCREMENT = 10000";
74 $query[] = "alter table Dictionary AUTO_INCREMENT = 10000";
75 $query[] = "alter table UserAccount AUTO_INCREMENT = 10000";
76 $query[] = "update UserAccount set user_id = user_id + 10000 where user_id between 2 and 10000";
77 $query[] = "update UserPermission set user_id = user_id + 10000 where user_id between 2 and 10000";
78 $query[] = "update Attribute set attr_id = attr_id + 10000 where attr_id between 25 and 10000";
79 $query[] = "update AttributeMap set attr_id = attr_id + 10000 where attr_id between 25 and 10000";
80 $query[] = "update Chapter set chapter_no = chapter_no + 10000 where chapter_no between 21 and 10000";
81 $query[] = "update AttributeMap set chapter_no = chapter_no + 10000 where chapter_no between 21 and 10000";
82 break; // --------------------------------------------
83 case '0.14.6':
84 // This version features new dictionary entries, the correction above should allow us
85 // inject them w/o a problem.
86 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (13,25,'FreeBSD 1.x')";
87 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (13,26,'FreeBSD 2.x')";
88 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (13,27,'FreeBSD 3.x')";
89 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (13,28,'FreeBSD 4.x')";
90 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (13,29,'FreeBSD 5.x')";
91 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (13,30,'FreeBSD 6.x')";
92 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (13,31,'RHFC8')";
93 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (13,32,'ALTLinux Master 4.0')";
94 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (20,20)";
95 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (21,21)";
96 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (22,22)";
97 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (23,23)";
98 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (24,24)";
99 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (25,25)";
100 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (26,26)";
101 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (27,27)";
102 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (28,28)";
103 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (2,20,'KVM')";
104 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (2,21,'1000Base-ZX')";
105 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (2,22,'10GBase-ER')";
106 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (2,23,'10GBase-LR')";
107 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (2,24,'10GBase-LRM')";
108 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (2,25,'10GBase-ZR')";
109 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (2,26,'10GBase-LX4')";
110 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (2,27,'10GBase-CX4')";
111 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (2,28,'10GBase-Kx')";
112 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (12,114,'Cisco Catalyst 2970G-24T')";
113 $query[] = "INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) VALUES (12,115,'Cisco Catalyst 2970G-24TS')";
114 $query[] = "INSERT INTO `UserPermission` (`user_id`, `page`, `tab`, `access`) VALUES (0,'help','%','yes')";
115 // And 0.14.6 is the first release, which features Config table. Let's create
116 // and fill it with default values.
117 $query[] = "
118CREATE TABLE `Config` (
119 `varname` char(32) NOT NULL,
120 `varvalue` char(64) NOT NULL,
121 `vartype` enum('string','uint') NOT NULL default 'string',
122 `emptyok` enum('yes','no') NOT NULL default 'no',
123 `is_hidden` enum('yes','no') NOT NULL default 'yes',
124 `description` text,
125 PRIMARY KEY (`varname`)
126) ENGINE=MyISAM DEFAULT CHARSET=latin1
127 ";
128 $query[] = "INSERT INTO `Config` VALUES ('rtwidth_0','9','uint','no','yes','')";
129 $query[] = "INSERT INTO `Config` VALUES ('rtwidth_1','21','uint','no','yes','')";
130 $query[] = "INSERT INTO `Config` VALUES ('rtwidth_2','9','uint','no','yes','')";
131 $query[] = "INSERT INTO `Config` VALUES ('color_F','8fbfbf','string','no','no','HSV: 180-25-75. Free atoms, they are available for allocation to objects.')";
132 $query[] = "INSERT INTO `Config` VALUES ('color_A','bfbfbf','string','no','no','HSV: 0-0-75. Absent atoms.')";
133 $query[] = "INSERT INTO `Config` VALUES ('color_U','bf8f8f','string','no','no','HSV: 0-25-75. Unusable atoms. Some problems keep them from being free.')";
134 $query[] = "INSERT INTO `Config` VALUES ('color_T','408080','string','no','no','HSV: 180-50-50. Taken atoms, object_id should be set for such.')";
135 $query[] = "INSERT INTO `Config` VALUES ('color_Th','80ffff','string','no','no','HSV: 180-50-100. Taken atoms with highlight. They are not stored in the database and are only used for highlighting.')";
136 $query[] = "INSERT INTO `Config` VALUES ('color_Tw','804040','string','no','no','HSV: 0-50-50. Taken atoms with object problem. This is detected at runtime.')";
137 $query[] = "INSERT INTO `Config` VALUES ('color_Thw','ff8080','string','no','no','HSV: 0-50-100. An object can be both current and problematic. We run highlightObject() first and markupObjectProblems() second.')";
138 $query[] = "INSERT INTO `Config` VALUES ('default_port_type','11','uint','no','no','Default value for port type selects.')";
139 $query[] = "INSERT INTO `Config` VALUES ('MASSCOUNT','15','uint','no','no','Number of lines in object mass-adding form.')";
140 $query[] = "INSERT INTO `Config` VALUES ('MAXSELSIZE','30','uint','no','no','Maximum size of a SELECT HTML element.')";
141 $query[] = "INSERT INTO `Config` VALUES ('enterprise','MyCompanyName','string','no','no','Fit to your needs.')";
142 $query[] = "INSERT INTO `Config` VALUES ('NAMEFUL_OBJTYPES','4,7,8','string','yes','no','These are the object types, which assume a common name to be normally configured. If a name is absent for an object of one of such types, HTML output is corrected to accent this misconfiguration.')";
143 $query[] = "INSERT INTO `Config` VALUES ('ROW_SCALE','2','uint','no','no','Row-scope picture scale factor.')";
144 $query[] = "INSERT INTO `Config` VALUES ('PORTS_PER_ROW','12','uint','no','yes','Max switch port per one row on the switchvlans dynamic tab.')";
145 $query[] = "INSERT INTO `Config` VALUES ('DB_VERSION','0.14.6','string','no','yes','Database version.')";
146 break; // --------------------------------------------
803338c1 147 case '0.14.7':
ce109ff2 148 // IPAddress is hopefully fixed now finally.
803338c1 149 $query[] = "delete from IPAddress where name = '' and reserved != 'yes'";
ce109ff2
DO
150
151 // Now rebuild the dictionary into a new table with the same data,
152 // but proper indexing. We are going to convert compound index
153 // into 1-field one to employ AUTO_INCREMENT properly. This means
154 // renumbering lots of records in Dictionary and adjusting records
155 // in related tables. After that we can safely swap the tables.
9bf70f70
DO
156 $query[] = "
157CREATE TABLE `Dictionary_0_14_7_new` (
158 `chapter_no` int(10) unsigned NOT NULL,
159 `dict_key` int(10) unsigned NOT NULL auto_increment,
160 `dict_value` char(128) default NULL,
161 PRIMARY KEY (`dict_key`),
162 UNIQUE KEY `chap_to_key` (`chapter_no`,`dict_key`),
163 UNIQUE KEY `chap_to_val` (`chapter_no`,`dict_value`)
164) TYPE=MyISAM AUTO_INCREMENT=50000
165";
ce109ff2 166
758fe24c 167echo '<pre>';
ce109ff2
DO
168 // Find all chapter numbers, which will require AttributeValue adjustment.
169 $q2 = 'select distinct chapter_no from AttributeMap where chapter_no != 0';
170 $r2 = $dbxlink->query ($q2);
758fe24c
DO
171 $chaplist = array();
172 while ($row = $r2->fetch (PDO::FETCH_NUM))
173 $chaplist[] = $row[0];
ce109ff2 174 $r2->closeCursor();
758fe24c 175 unset ($r2);
ce109ff2
DO
176
177 $stock = array();
178 // Below I list the records, which are known to be the stock
179 // dictionary records of 0.14.6 release.
180 $stock[1] = array
181 (
182 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16
183 );
184 $stock[2] = array
185 (
186 3, 4, 5, 6, 7, 8, 9,
187 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
188 20, 21, 22, 23, 24, 25, 26, 27, 28
189 );
190 $stock[11] = array
191 (
192 1, 3, 4, 5, 6, 7, 8, 9,
193 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
194 21, 22, 24, 25, 26, 27, 28, 29,
195 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
196 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
197 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
198 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
199 70, 71, 72, 73, 74, 75, 76
200 );
201 $stock[12] = array
202 (
203 1, 11, 13, 14, 15, 16, 17, 18, 19, 20, 26, 29,
204 31, 32, 33, 34, 35, 36, 37, 38, 39,
205 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
206 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
207 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
208 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
209 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
210 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
211 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
db1147d2 212 110, 111, 112, 113, 114, 115
ce109ff2
DO
213 );
214 $stock[13] = array
215 (
216 1, 2, 3, 4, 5, 6, 7, 8, 9,
217 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
218 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
219 30, 31, 32
220 );
221 $stock[14] = array
222 (
223 1, 2, 9, 11, 13, 15, 19, 20, 21, 22
224 );
225 $stock[16] = array
226 (
227 1, 2, 3, 4, 5, 6, 7, 8
228 );
229 $stock[17] = array
230 (
231 1, 2, 3, 4, 5, 6, 7, 8, 9,
232 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
233 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
234 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
235 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
236 50
237 );
238 $stock[18] = array
239 (
240 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
241 );
242 $stock[19] = array
243 (
244 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
245 );
246 $stock[20] = array
247 (
248 1, 2
249 );
250
251 // Load dictionary and transform into two tree structures for
252 // stock and user record sets.
253 $dict = array();
264b07b4 254 $q3 = 'select chapter_no, dict_key, dict_value from Dictionary order by chapter_no, dict_key';
ce109ff2
DO
255 $r3 = $dbxlink->query ($q3);
256
9e7f8a4b 257 while ($row = $r3->fetch (PDO::FETCH_ASSOC))
ce109ff2
DO
258 {
259 $tree = 'user';
260 $dict_key = $row['dict_key'];
261 $chapter_no = $row['chapter_no'];
262 switch ($chapter_no)
263 {
264 case 1: // RackObjectType
265 case 2: // PortType
266 case 11: // server models
267 case 12: // network switch models
268 case 13: // server OS type
269 case 14: // network switch OS type
270 case 16: // router OS type
271 case 17: // router models
272 case 18: // disk array models
273 case 19: // tape library models
274 case 20: // Protocols
275 if (in_array ($dict_key, $stock[$chapter_no]))
276 $tree = 'stock';
277 break;
278 }
a07a39b1 279 $dict[$tree][$chapter_no][$dict_key] = array ('value' => $row['dict_value']);
ce109ff2
DO
280 }
281 $r3->closeCursor();
758fe24c 282 unset ($r3);
ce109ff2
DO
283
284
285 // Now we store stock dataset first, bump up key value and store
286 // user's data. After that we will know the new dict_key for all
287 // records.
288 // The result of both datasets processing is saved in $new_dict.
289 // Save on calling LAST_ISERT_ID() each time by keeping own key.
290 $newkey = 1;
291 $new_dict = array();
292 foreach ($dict['stock'] as $chapter_no => $words)
293 {
294 $new_dict[$chapter_no] = array();
295 foreach ($words as $dict_key => $entry)
296 {
1b5942be 297 $query[] = "insert into Dictionary_0_14_7_new (chapter_no, dict_key, dict_value) " .
ce109ff2
DO
298 "values (${chapter_no}, ${newkey}, '${entry['value']}')";
299 $new_dict[$chapter_no][$dict_key] = $entry;
300 $new_dict[$chapter_no][$dict_key]['newkey'] = $newkey;
301 $newkey++;
302 }
303 }
e7882270 304 $newkey = 50000;
ce109ff2
DO
305 foreach ($dict['user'] as $chapter_no => $words)
306 {
307 // Some chapters may appear on the user dataset only.
308 if (!isset ($new_dict[$chapter_no]))
309 $new_dict[$chapter_no] = array();
310 foreach ($words as $dict_key => $entry)
311 {
312 $query[] = "insert into Dictionary_0_14_7_new " .
313 "values (${chapter_no}, ${newkey}, '${entry['value']}')";
314 $new_dict[$chapter_no][$dict_key] = $entry;
315 $new_dict[$chapter_no][$dict_key]['newkey'] = $newkey;
316 $newkey++;
317 }
318 }
319 // The new table should now have adequate AUTO_INCREMENT w/o our care.
758fe24c
DO
320 // Install the new data.
321 $query[] = 'drop table Dictionary';
322 $query[] = 'alter table Dictionary_0_14_7_new rename to Dictionary';
ce109ff2
DO
323
324 // Now we iterate over the joint dataset, picking some chapters and
325 // performing additional processing:
326 // 1 (RackObjectType) --- adjust RackObject and regenerate AttributeMap
a07a39b1 327 // 2 (PortType) --- adjust Port and regenerate PortCompat (at a latter point)
ce109ff2
DO
328 // 3 (RackRow) --- adjust Rack
329 // 20 (Protocols) --- adjust PortForwarding
330 // All other chapters listed in $chaplist --- adjust AttributeValue
331
332 $query[] = "delete from AttributeMap";
333 foreach ($new_dict as $chapter_no => $words)
334 {
335 foreach ($words as $oldkey => $data)
336 {
337 $value = $data['value'];
338 $newkey = $data['newkey'];
264b07b4
DO
339 // Even if the key doesn't change, go on to have
340 // AttributeMap regenerated completely.
ce109ff2
DO
341 if ($chapter_no == 1)
342 {
343 $q4 = "select id from RackObject where objtype_id = ${oldkey}";
344 $r4 = $dbxlink->query ($q4);
345 while ($row = $r4->fetch (PDO::FETCH_ASSOC))
346 $query[] = "update RackObject set objtype_id = ${newkey} where id = ${row['id']} limit 1";
347 $r4->closeCursor();
264b07b4 348 unset ($r4);
ce109ff2 349
758fe24c
DO
350 $q5 = "select attr_id, chapter_no from AttributeMap where objtype_id = ${oldkey}";
351 $r5 = $dbxlink->query ($q5);
352 while ($row = $r5->fetch (PDO::FETCH_ASSOC))
ce109ff2 353 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (${newkey}, ${row['attr_id']}, ${row['chapter_no']})";
758fe24c 354 $r5->closeCursor();
264b07b4 355 unset ($r5);
ce109ff2 356 }
a07a39b1
DO
357 elseif ($chapter_no == 2)
358 {
758fe24c 359 $q46 = "select id from Port where type = ${oldkey}";
758fe24c
DO
360 $r46 = $dbxlink->query ($q46);
361 if ($r46 == NULL)
362 echo 'ERROR';
363 while ($row = $r46->fetch (PDO::FETCH_ASSOC))
a07a39b1 364 $query[] = "update Port set type = ${newkey} where id = ${row['id']} limit 1";
758fe24c 365 $r46->closeCursor();
264b07b4 366 unset ($r46);
a07a39b1 367 }
ce109ff2
DO
368 elseif ($chapter_no == 3)
369 {
758fe24c
DO
370 $q7 = "select id from Rack where row_id = ${oldkey}";
371 $r7 = $dbxlink->query ($q7);
372 while ($row = $r7->fetch (PDO::FETCH_ASSOC))
ce109ff2 373 $query[] = "update Rack set row_id = ${newkey} where id = ${row['id']} limit 1";
758fe24c 374 $r7->closeCursor();
264b07b4 375 unset ($r7);
ce109ff2 376 }
a07a39b1
DO
377 elseif ($chapter_no == 20)
378 {
264b07b4
DO
379 $q8 = "select object_id, localip, localport, remoteip, remoteport from PortForwarding where proto = ${oldkey}";
380 $r8 = $dbxlink->query ($q8);
758fe24c 381 while ($row = $r8->fetch (PDO::FETCH_ASSOC))
264b07b4
DO
382 $query[] = "update PortForwarding set proto = ${newkey} where " .
383 "object_id = ${row['object_id']} and localip = ${row['localip']} and " .
384 "localport = ${row['localport']} and remoteip = ${row['remoteip']} and " .
385 "remoteport = ${row['remoteport']} and proto = ${oldkey} limit 1";
758fe24c 386 $r8->closeCursor();
264b07b4 387 unset ($r8);
758fe24c
DO
388 }
389 elseif (in_array ($chapter_no, $chaplist))
390 {
5b1d68c5 391 $q81 = "select object_id, AttributeValue.attr_id from " .
264b07b4
DO
392 "AttributeValue natural join Attribute natural join AttributeMap " .
393 "inner join RackObject on RackObject.id = object_id and RackObject.objtype_id = AttributeMap.objtype_id " .
394 "where attr_type = 'dict' and chapter_no = ${chapter_no} and uint_value = ${oldkey}";
395 $r81 = $dbxlink->query ($q81);
396 while ($row = $r81->fetch (PDO::FETCH_ASSOC))
1b5942be
DO
397 $query[] = "update AttributeValue set uint_value = ${newkey} " .
398 "where object_id = ${row['object_id']} and attr_id = ${row['attr_id']}";
264b07b4
DO
399 $r81->closeCursor();
400 unset ($r81);
a07a39b1 401 }
ce109ff2
DO
402 }
403 }
a07a39b1 404 // Now it's possible to schedule PortCompat regeneration.
1b5942be
DO
405 // Convert the fields to unsigned on occasion.
406 $query[] = 'drop table PortCompat';
407 $query[] = 'create table PortCompat (type1 int(10) unsigned NOT NULL, type2 int(10) unsigned NOT NULL)';
758fe24c
DO
408 $q9 = "select type1, type2 from PortCompat";
409 $r9 = $dbxlink->query ($q9);
410 while ($row = $r9->fetch (PDO::FETCH_ASSOC))
a07a39b1
DO
411 {
412 $new_type1 = $new_dict[2][$row['type1']]['newkey'];
413 $new_type2 = $new_dict[2][$row['type2']]['newkey'];
414 $query[] = "insert into PortCompat (type1, type2) values (${new_type1}, ${new_type2})";
415 }
758fe24c 416 $r9->closeCursor();
264b07b4 417 unset ($r9);
758fe24c 418echo '</pre>';
a07a39b1
DO
419
420 // Give the configuration some finish
421 $query[] = "update Config set is_hidden = 'yes' where varname = 'color_F'";
422 $query[] = "update Config set is_hidden = 'yes' where varname = 'color_A'";
423 $query[] = "update Config set is_hidden = 'yes' where varname = 'color_U'";
424 $query[] = "update Config set is_hidden = 'yes' where varname = 'color_T'";
425 $query[] = "update Config set is_hidden = 'yes' where varname = 'color_Th'";
426 $query[] = "update Config set is_hidden = 'yes' where varname = 'color_Tw'";
427 $query[] = "update Config set is_hidden = 'yes' where varname = 'color_Thw'";
428 $query[] = "update Config set description = 'Default port type' where varname = 'default_port_type'";
429 $query[] = "update Config set description = 'Picture scale for rack row display' where varname = 'ROW_SCALE'";
430 $query[] = "update Config set description = 'Organization name' where varname = 'enterprise'";
431 $query[] = "update Config set description = 'Expect common name configured for the following object types' where varname = 'NAMEFUL_OBJTYPES'";
432 $query[] = "update Config set description = '&lt;SELECT&gt; lists height' where varname = 'MAXSELSIZE'";
433 $query[] = "update Config set description = '&quot;Fast&quot; form is this many records tall' where varname = 'MASSCOUNT'";
264b07b4 434 $query[] = "update Config set is_hidden = 'no', description = 'Ports per row in VLANs tab' where varname = 'PORTS_PER_ROW'";
a07a39b1 435 $query[] = "INSERT INTO `Config` VALUES ('IPV4_ADDRS_PER_PAGE','256','uint','no','no','IPv4 addresses per page')";
9e7f8a4b 436 $query[] = "INSERT INTO `Config` VALUES ('DEFAULT_RACK_HEIGHT','42','uint','yes','no','Default rack height')";
bd912758
DO
437 // After Dictionary transformation we ought to list 337 stock records in DB. Add more.
438 $new_words = array();
439 $new_words[338] = array (12 => 'Dell PowerConnect 2216');
440 $new_words[] = array (12 => 'Dell PowerConnect 2224');
441 $new_words[] = array (12 => 'Dell PowerConnect 2324');
442 $new_words[] = array (12 => 'Dell PowerConnect 2708');
443 $new_words[] = array (12 => 'Dell PowerConnect 2716');
444 $new_words[] = array (12 => 'Dell PowerConnect 2724');
445 $new_words[] = array (12 => 'Dell PowerConnect 2748');
446 $new_words[] = array (12 => 'Dell PowerConnect 3424');
447 $new_words[] = array (12 => 'Dell PowerConnect 3424P');
448 $new_words[] = array (12 => 'Dell PowerConnect 3448');
449 $new_words[] = array (12 => 'Dell PowerConnect 3448P');
450 $new_words[] = array (12 => 'Dell PowerConnect 5324');
451 $new_words[] = array (12 => 'Dell PowerConnect 6224');
452 $new_words[] = array (12 => 'Dell PowerConnect 6224P');
453 $new_words[] = array (12 => 'Dell PowerConnect 6224F');
454 $new_words[] = array (12 => 'Dell PowerConnect 6248');
455 $new_words[] = array (12 => 'Dell PowerConnect 6248P');
456 $new_words[] = array (11 => 'Dell PowerEdge 6850');
457 $new_words[] = array (11 => 'Dell PowerEdge 6950');
458 $new_words[] = array (11 => 'Dell PowerEdge R900');
459 $new_words[] = array (11 => 'Dell PowerEdge 4400');
460 $new_words[] = array (11 => 'Dell PowerEdge 2650');
461 $new_words[] = array (11 => 'Dell PowerEdge 2550');
462 $new_words[] = array (11 => 'Dell PowerEdge 750');
463 $new_words[] = array (11 => 'Dell PowerEdge 2450');
464 $new_words[] = array (11 => 'Dell PowerEdge 850');
465 $new_words[] = array (11 => 'Dell PowerEdge 1850');
466 $new_words[] = array (11 => 'Dell PowerEdge 860');
467 $new_words[] = array (11 => 'Dell PowerEdge 2900');
468 $new_words[] = array (11 => 'Dell PowerEdge 2970');
469 $new_words[] = array (11 => 'Dell PowerEdge SC1435');
470 $new_words[] = array (12 => 'Cisco Catalyst 6509');
471 $new_words[] = array (12 => 'Cisco ME 6524GS-8S');
472 $new_words[] = array (12 => 'Cisco ME 6524GT-8S');
473 $new_words[] = array (12 => 'Cisco Catalyst 4503-E');
474 $new_words[] = array (12 => 'Cisco Catalyst 4506-E');
475 $new_words[] = array (12 => 'Cisco Catalyst 4507R-E');
476 $new_words[] = array (12 => 'Cisco Catalyst 4510R-E');
477 $new_words[] = array (12 => 'Cisco Catalyst 3750-24TE-M');
478 $new_words[] = array (12 => 'Cisco Catalyst 4948-10GE');
479 $new_words[] = array (12 => 'Cisco ME 4924-10GE');
480 $new_words[] = array (12 => 'Cisco Catalyst 2960-24');
481 $new_words[] = array (12 => 'Cisco Catalyst 2950-24');
482 $new_words[] = array (12 => 'Cisco Catalyst 2950-12');
483 $new_words[] = array (12 => 'Cisco Catalyst 2950C-24');
484 $new_words[] = array (12 => 'Cisco Catalyst 2950G-24-DC');
485 $new_words[] = array (12 => 'Cisco Catalyst 2950SX-48');
486 $new_words[] = array (12 => 'Cisco Catalyst 2950SX-24');
487 $new_words[] = array (12 => 'Cisco Catalyst 2950T-24');
488 $new_words[] = array (12 => 'Cisco Catalyst 2950T-48');
489 $new_words[] = array (12 => 'Cisco Catalyst 2950G-12');
490 $new_words[] = array (12 => 'Cisco Catalyst 2950G-24');
491 $new_words[] = array (12 => 'Cisco Catalyst 2950G-48');
bd912758
DO
492 $new_words[] = array (12 => 'Cisco Catalyst 3508G XL');
493 $new_words[] = array (12 => 'Cisco Catalyst 3512 XL');
494 $new_words[] = array (12 => 'Cisco Catalyst 3524 XL');
495 $new_words[] = array (12 => 'Cisco Catalyst 3524 PWR XL');
496 $new_words[] = array (12 => 'Cisco Catalyst 3548 XL');
497 $new_words[] = array (12 => 'Cisco ME 2400-24TS-A');
498 $new_words[] = array (12 => 'Cisco ME 2400-24TS-D');
499 $new_words[] = array (12 => 'Cisco Catalyst 3550-12T');
500 $new_words[] = array (12 => 'Cisco Catalyst 3550-12G');
501 $new_words[] = array (12 => 'Cisco Catalyst 3550-24');
502 $new_words[] = array (12 => 'Cisco Catalyst 3550-24 FX');
503 $new_words[] = array (12 => 'Cisco Catalyst 3550-24 DC');
504 $new_words[] = array (12 => 'Cisco Catalyst 3550-24 PWR');
505 $new_words[] = array (12 => 'Cisco Catalyst 3550-48');
506 $new_words[] = array (12 => 'Cisco ME 3400G-12CS-A');
507 $new_words[] = array (12 => 'Cisco ME 3400G-12CS-D');
508 $new_words[] = array (12 => 'Cisco ME 3400G-2CS-A');
509 $new_words[] = array (12 => 'Cisco ME 3400-24TS-A');
510 $new_words[] = array (12 => 'Cisco ME 3400-24TS-D');
511 $new_words[] = array (12 => 'Cisco ME 3400-24FS-A');
7373a304
DO
512 $new_words[] = array (12 => 'Foundry FastIron GS 624XGP');
513 $new_words[] = array (12 => 'Foundry FastIron GS 624XGP-POE');
514 $new_words[] = array (12 => 'Foundry FastIron LS 624');
515 $new_words[] = array (12 => 'Foundry FastIron LS 648');
516 $new_words[] = array (12 => 'Foundry NetIron M2404F');
517 $new_words[] = array (12 => 'Foundry NetIron M2404C');
518 $new_words[] = array (17 => 'Foundry BigIron RX-32');
e7882270
DO
519 $new_words[] = array (13 => 'Debian 2.0 (hamm)');
520 $new_words[] = array (13 => 'Debian 2.1 (slink)');
521 $new_words[] = array (13 => 'Debian 2.2 (potato)');
522 $new_words[] = array (13 => 'Debian 4.0 (etch)');
523 $new_words[] = array (13 => 'ALTLinux Server 4.0');
e7882270
DO
524 $new_words[] = array (13 => 'ALTLinux Sisyphus');
525 $new_words[] = array (13 => 'openSUSE 10.0');
526 $new_words[] = array (13 => 'openSUSE 10.1');
527 $new_words[] = array (13 => 'openSUSE 10.2');
528 $new_words[] = array (13 => 'openSUSE 10.3');
529 $new_words[] = array (13 => 'Ubuntu 4.10');
530 $new_words[] = array (13 => 'Ubuntu 5.04');
531 $new_words[] = array (13 => 'Ubuntu 5.10');
532 $new_words[] = array (13 => 'Ubuntu 6.06 LTS');
533 $new_words[] = array (13 => 'Ubuntu 6.10');
534 $new_words[] = array (13 => 'Ubuntu 7.04');
535 $new_words[] = array (13 => 'Ubuntu 7.10');
536 $new_words[] = array (13 => 'Ubuntu 8.04 LTS');
537 $new_words[] = array (13 => 'RHEL5');
5f58747d
DO
538 $new_words[] = array (18 => 'Dell PowerVault 210S');
539 $new_words[] = array (18 => 'Dell PowerVault 221S');
ab0ec3ef
DO
540 $new_words[] = array (2 => 'dry contact');
541 $new_words[] = array (2 => 'unknown');
499dfa73
DO
542 // Two above records ought to take keys 439 and 440.
543 $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (439,439)";
efb6bab4
DO
544 $new_words[] = array (13 => 'CentOS-2');
545 $new_words[] = array (13 => 'CentOS-3');
546 $new_words[] = array (13 => 'CentOS-4');
547 $new_words[] = array (13 => 'CentOS-5');
bd912758
DO
548 foreach ($new_words as $dict_key => $tmp)
549 foreach ($tmp as $chapter_no => $dict_value)
550 $query[] = 'INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) ' .
551 "VALUES (${chapter_no}, ${dict_key}, '${dict_value}')";
57913f20
DO
552 // Resetting to defaults is worse, than remapping, but better than
553 // leaving messed values.
554 $query[] = "update Config set varvalue = '24' where varname = 'default_port_type' limit 1";
ce109ff2 555 // We are done.
54c2a7a8 556 $query[] = "update Config set varvalue = '0.14.7' where varname = 'DB_VERSION'";
803338c1 557 break; // --------------------------------------------
a6305acc
DO
558 case '0.14.8':
559 $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('REQUIRE_ASSET_TAG_FOR','4,7,8','string','yes','no','Require asset tag for the following object types')";
78f44cbc
DO
560 $query[] = "alter table Port modify column id int(10) unsigned NOT NULL auto_increment";
561 $query[] = "alter table Port modify column object_id int(10) unsigned NOT NULL";
562 $query[] = "alter table Port modify column type int(10) unsigned NOT NULL";
563 $query[] = "alter table Link modify column porta int(10) unsigned";
564 $query[] = "alter table Link modify column portb int(10) unsigned";
ba1c6d42
DO
565 $query[] = "alter table PortForwarding modify column object_id int(10) unsigned not null";
566 $query[] = "alter table PortForwarding modify column localport smallint(5) unsigned not null";
567 $query[] = "alter table PortForwarding modify column remoteport smallint(5) unsigned not null";
568 $query[] = "alter table IPBonds modify column object_id int(10) unsigned not null";
569 $query[] = "alter table IPRanges modify column id int(10) unsigned not null";
570 $query[] = "alter table IPRanges modify column mask int(10) unsigned not null";
78f44cbc
DO
571 $query[] = "alter table Port add index `type` (type)";
572 $query[] = "alter table PortCompat add index `type1` (type1)";
573 $query[] = "alter table PortCompat add index `type2` (type2)";
992d2ec2
DO
574 $query[] = "update Dictionary set dict_value = 'Debian 3.0 (woody)' where dict_key = 234";
575 $query[] = "update Dictionary set dict_value = 'Debian 3.1 (sarge)' where dict_key = 235";
576 $query[] = "update Dictionary set dict_value = 'Foundry BigIron 15000' where dict_key = 311";
577 $query[] = "update Dictionary set dict_value = 'RHF7' where dict_key = 232";
578 $query[] = "update Dictionary set dict_value = 'RHF8' where dict_key = 242";
c8b74094
DO
579 $query[] = "INSERT INTO `Attribute` (`attr_id`, `attr_type`, `attr_name`) VALUES (25,'string','UUID');";
580 $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_no`) VALUES (4,25,0);";
ba1c6d42
DO
581 $query[] = "update Dictionary set dict_value = '[[Cisco Catalyst 2970G-24T | http://www.cisco.com/en/US/products/hw/switches/ps5206/ps5313/index.html]]' where dict_key = 210";
582 $query[] = "update Dictionary set dict_value = '[[Cisco Catalyst 2970G-24TS | http://www.cisco.com/en/US/products/hw/switches/ps5206/ps5437/index.html]]' where dict_key = 211";
78f44cbc 583 $query[] = "update Config set varvalue = '0.14.8' where varname = 'DB_VERSION'";
a6305acc 584 break; // --------------------------------------------
cf48742e
DO
585 case '0.14.9':
586 $query[] = "alter table IPRanges modify column id int(10) unsigned not null auto_increment";
0a7136d4 587 $query[] = "alter table Rack modify column height tinyint(3) unsigned not null default '42'";
86f94102 588 $query[] = "alter table Rack add column thumb_data blob after comment";
2526f63c
DO
589 $query[] = "
590CREATE TABLE `IPLoadBalancer` (
591 `object_id` int(10) unsigned default NULL,
592 `rspool_id` int(10) unsigned default NULL,
70c24883 593 `vs_id` int(10) unsigned default NULL,
2526f63c
DO
594 `vsconfig` text,
595 `rsconfig` text,
70c24883 596 UNIQUE KEY `LB-VS` (`object_id`,`vs_id`)
2526f63c
DO
597) ENGINE=MyISAM";
598 $query[] = "
599CREATE TABLE `IPRSPool` (
600 `id` int(10) unsigned NOT NULL auto_increment,
2526f63c
DO
601 `name` char(255) default NULL,
602 `vsconfig` text,
603 `rsconfig` text,
604 PRIMARY KEY (`id`)
605) ENGINE=MyISAM";
606 $query[] = "
607CREATE TABLE `IPRealServer` (
608 `id` int(10) unsigned NOT NULL auto_increment,
35b72b35 609 `inservice` enum('yes','no') NOT NULL default 'no',
2526f63c
DO
610 `rsip` int(10) unsigned default NULL,
611 `rsport` smallint(5) unsigned default NULL,
612 `rspool_id` int(10) unsigned default NULL,
613 `rsconfig` text,
70c24883
DO
614 PRIMARY KEY (`id`),
615 UNIQUE KEY `pool-endpoint` (`rspool_id`,`rsip`,`rsport`)
2526f63c
DO
616) ENGINE=MyISAM";
617 $query[] = "
618CREATE TABLE `IPVirtualService` (
619 `id` int(10) unsigned NOT NULL auto_increment,
620 `vip` int(10) unsigned default NULL,
621 `vport` smallint(5) unsigned default NULL,
622 `proto` enum('TCP','UDP') NOT NULL default 'TCP',
623 `name` char(255) default NULL,
624 `vsconfig` text,
625 `rsconfig` text,
d800a805 626 PRIMARY KEY (`id`)
2526f63c 627) ENGINE=MyISAM";
d800a805 628 $query[] = "INSERT INTO `Config` VALUES ('DEFAULT_SLB_VS_PORT','','uint','yes','no','Default port of SLB virtual service')";
73e11958 629 $query[] = "INSERT INTO `Config` VALUES ('DEFAULT_SLB_RS_PORT','','uint','yes','no','Default port of SLB real server')";
6dbdc7c7
DO
630 $query[] = "INSERT INTO `Config` VALUES ('IPV4_PERFORMERS','1,4,7,8,12,14','string','yes','no','IPv4-capable object types')";
631 $query[] = "INSERT INTO `Config` VALUES ('NATV4_PERFORMERS','4,7,8','string','yes','no','NATv4-capable object types')";
f2154c9f 632 $query[] = "INSERT INTO `Config` VALUES ('USER_AUTH_SRC','database','string','no','no','User authentication source')";
3e0fc4b6 633 $query[] = "alter table RackSpace drop column problem_id";
d800a805 634 $query[] = "update Config set varvalue = '0.14.9' where varname = 'DB_VERSION'";
cf48742e 635 break; // --------------------------------------------
a6f83a72
DO
636 case '0.14.10':
637 $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('DETECT_URLS','no','string','yes','no','Detect URLs in text fields')";
f187f2ec
DO
638 $query[] = "alter table RackHistory modify column height tinyint(3) unsigned";
639 $query[] = "alter table RackHistory add column thumb_data blob after comment";
4b8d413e 640 $query[] = "INSERT INTO `Config` VALUES ('RACK_PRESELECT_THRESHOLD','1','uint','no','no','Rack pre-selection threshold')";
a6f83a72 641 $query[] = "update Config set varvalue = '0.14.10' where varname = 'DB_VERSION'";
81dbd3bc 642 break; // --------------------------------------------
2ff234d6
DO
643 case '0.14.11':
644 $new_words = array();
645 $new_words[445] = array (1 => 'KVM switch');
646 $new_words[] = array (2 => 'KVM (console)');
647 $new_words[] = array (1 => 'multiplexer');
648 $query[] = "update Dictionary set dict_value = 'network switch' where dict_key = 8";
649 $query[] = "update Dictionary set dict_value = 'KVM (host)' where dict_key = 33";
650 $query[] = "delete from PortCompat where type1 = 33 and type2 = 33";
651 $query[] = "insert into PortCompat (type1, type2) values (33, 446)";
652 $query[] = "insert into PortCompat (type1, type2) values (446, 33)";
35d3ecaf
DO
653 $query[] = "insert into Chapter (chapter_no, sticky, chapter_name) values (21, 'no', 'KVM switch models')";
654 $query[] = "insert into Chapter (chapter_no, sticky, chapter_name) values (22, 'no', 'multiplexer models')";
2ff234d6
DO
655 $query[] = "update Chapter set chapter_name = 'network switch models' where chapter_no = 12";
656 $new_words[] = array (21 => '[[Avocent DSR1021 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2418]]');
657 $new_words[] = array (21 => '[[Avocent DSR1022 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2498]]');
658 $new_words[] = array (21 => '[[Avocent DSR1024 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2588]]');
659 $new_words[] = array (21 => '[[Avocent DSR1031 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2804]]');
660 $new_words[] = array (21 => '[[Avocent DSR1020 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2340]]');
661 $new_words[] = array (21 => '[[Avocent DSR2020 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2884]]');
662 $new_words[] = array (21 => '[[Avocent DSR4020 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=3100]]');
663 $new_words[] = array (21 => '[[Avocent DSR8020 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=3358]]');
664 $new_words[] = array (21 => '[[Avocent DSR1030 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2726]]');
665 $new_words[] = array (21 => '[[Avocent DSR2030 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2988]]');
666 $new_words[] = array (21 => '[[Avocent DSR2035 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=3050]]');
667 $new_words[] = array (21 => '[[Avocent DSR4030 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=3196]]');
668 $new_words[] = array (21 => '[[Avocent DSR8030 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=3472]]');
669 $new_words[] = array (21 => '[[Avocent DSR8035 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=3580]]');
670 $new_words[] = array (21 => '[[Avocent AutoView 1415 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=1612]]');
671 $new_words[] = array (21 => '[[Avocent AutoView 1515 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=1736]]');
672 $new_words[] = array (21 => '[[Avocent AutoView 2015 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=1930]]');
673 $new_words[] = array (21 => '[[Avocent AutoView 2020 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2012]]');
674 $new_words[] = array (21 => '[[Avocent AutoView 2030 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2114]]');
675 $new_words[] = array (21 => '[[Avocent AutoView 3100 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2222]]');
676 $new_words[] = array (21 => '[[Avocent AutoView 3200 | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=2266]]');
677 $new_words[] = array (21 => '[[Avocent SwitchView 1000 4-port | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=4016]]');
678 $new_words[] = array (21 => '[[Avocent SwitchView 1000 8-port | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=4094]]');
679 $new_words[] = array (21 => '[[Avocent SwitchView 1000 16-port | http://www.avocent.com/WorkArea/linkit.aspx?LinkIdentifier=id&ItemID=3934]]');
680 $new_words[] = array (22 => '[[Cronyx FMUX/S-4E1 | http://www.cronyx.ru/hardware/fmux-ring.html]]');
681 $new_words[] = array (22 => '[[Cronyx FMUX/S-4E1/ETS | http://www.cronyx.ru/hardware/fmux-ring.html]]');
682 $new_words[] = array (22 => '[[Cronyx FMUX/S-4E1/M | http://www.cronyx.ru/hardware/fmux-ring.html]]');
683 $new_words[] = array (22 => '[[Cronyx FMUX/S-8E1 | http://www.cronyx.ru/hardware/fmux-ring.html]]');
684 $new_words[] = array (22 => '[[Cronyx FMUX/S-8E1/ETS | http://www.cronyx.ru/hardware/fmux-ring.html]]');
685 $new_words[] = array (22 => '[[Cronyx FMUX/S-8E1/M | http://www.cronyx.ru/hardware/fmux-ring.html]]');
686 $new_words[] = array (22 => '[[Cronyx FMUX/S-16E1 | http://www.cronyx.ru/hardware/fmux-ring.html]]');
687 $new_words[] = array (22 => '[[Cronyx FMUX/S-16E1/ETS | http://www.cronyx.ru/hardware/fmux-ring.html]]');
688 $new_words[] = array (22 => '[[Cronyx FMUX/S-16E1/M | http://www.cronyx.ru/hardware/fmux-ring.html]]');
689 $new_words[] = array (22 => '[[Cronyx E1-XL/S | http://www.cronyx.ru/hardware/e1xl-s.html]]');
690 $new_words[] = array (22 => '[[Cronyx E1-DXC/S | http://www.cronyx.ru/hardware/e1dxc-s.html]]');
691 $new_words[] = array (22 => '[[Cronyx FMUX-4-E2 | http://www.cronyx.ru/hardware/fmux4-e2.html]]');
692 $new_words[] = array (22 => '[[Cronyx FMUX-4-E3 | http://www.cronyx.ru/hardware/fmux16-e3.html]]');
693 $new_words[] = array (22 => '[[Cronyx FMUX/SAT | http://www.cronyx.ru/hardware/fmux-sat.html]]');
694 $new_words[] = array (22 => '[[Cronyx E1-XL/S-IP | http://www.cronyx.ru/hardware/e1xl-ip.html]]');
695 $new_words[] = array (17 => '[[RAD FCD-IPM | http://www.rad.com/Article/0,6583,36426-E1_T1_or_Fractional_E1_T1_Modular_Access_Device_with_Integrated_Router,00.html]]');
696 $new_words[] = array (22 => '[[RAD FCD-E1M | http://www.rad.com/Article/0,6583,36723-E1_T1_Modular_Access_Multiplexer,00.html]]');
697 $new_words[] = array (22 => '[[RAD FCD-T1M | http://www.rad.com/Article/0,6583,36723-E1_T1_Modular_Access_Multiplexer,00.html]]');
698 $new_words[] = array (22 => '[[RAD FCD-155E | http://www.rad.com/Article/0,6583,36276-Ethernet_over_SDH_SONET_ADM,00.html]]');
699 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (445, 1, 0)";
700 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (445, 2, 21)";
701 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (445, 3, 0)";
702 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (445, 5, 0)";
703 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (445, 14, 0)";
704 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (445, 22, 0)";
705 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (447, 1, 0)";
706 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (447, 2, 22)";
707 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (447, 3, 0)";
708 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (447, 5, 0)";
709 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (447, 14, 0)";
710 $query[] = "insert into AttributeMap (objtype_id, attr_id, chapter_no) values (447, 22, 0)";
2ff234d6
DO
711 foreach ($new_words as $dict_key => $tmp)
712 foreach ($tmp as $chapter_no => $dict_value)
713 $query[] = 'INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) ' .
714 "VALUES (${chapter_no}, ${dict_key}, '${dict_value}')";
f70bed91 715 $query[] = "update Rack set thumb_data = NULL";
2ff234d6
DO
716 $query[] = "update Config set varvalue = '0.14.11' where varname = 'DB_VERSION'";
717 break; // --------------------------------------------
7e7a8387 718 case '0.14.12':
2c53a252 719 $query[] = "INSERT INTO `Config` VALUES ('DEFAULT_IPV4_RS_INSERVICE','no','string','no','no','Inservice status for new SLB real servers')";
a52b9eb1 720 $query[] = "INSERT INTO `Config` VALUES ('AUTOPORTS_CONFIG','4 = 1*33*kvm + 2*24*eth%u;15 = 1*446*kvm','string','yes','no','AutoPorts configuration')";
a477e405 721 $query[] = "INSERT INTO `Config` VALUES ('DEFAULT_OBJECT_TYPE','4','uint','yes','no','Default object type for new objects')";
684bbcac
DO
722 $query[] = "insert into Chapter (chapter_no, sticky, chapter_name) values (23, 'no', 'console models')";
723 $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_no`) VALUES (15, 2, 23)";
b83abd29 724 $query[] = "alter table Dictionary modify column dict_value char(255)";
03350e39 725 $new_words[491] = array (21 => '[[Aten CS78 | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20070319151852001&layerid=subClass2]]');
684bbcac
DO
726 $new_words[] = array (21 => '[[Aten ACS1208A | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050224111025006&layerid=subClass2]]');
727 $new_words[] = array (21 => '[[Aten ACS1216A | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050224111953008&layerid=subClass2]]');
728 $new_words[] = array (21 => '[[Aten CS1754 | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050217161051008&layerid=subClass2]]');
729 $new_words[] = array (21 => '[[Aten CS1758 | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050224093143008&layerid=subClass2]]');
730 $new_words[] = array (21 => '[[Aten CS9134 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20070130133658002&pid=20050217172845005&layerid=subClass2]]');
731 $new_words[] = array (21 => '[[Aten CS9138 | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050224094519006&layerid=subClass2]]');
732 $new_words[] = array (21 => '[[Aten CS1708 | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=2005022410563008&layerid=subClass2]]');
733 $new_words[] = array (21 => '[[Aten CS1716 | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050224110022008&layerid=subClass2]]');
734 $new_words[] = array (21 => '[[Aten CS1004 | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050224100546008&layerid=subClass2]]');
735 $new_words[] = array (21 => '[[Aten CS228 | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050224114323008&layerid=subClass2]]');
736 $new_words[] = array (21 => '[[Aten CS428 | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050224114721008&layerid=subClass2]]');
737 $new_words[] = array (21 => '[[Aten CS138A | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=20050224111458007&layerid=subClass2]]');
738 $new_words[] = array (21 => '[[Aten CS88A | http://www.aten.com/products/productItem.php?pcid=20070130111936003&psid=20070130133658002&pid=2005022411042006&layerid=subClass2]]');
739 $new_words[] = array (21 => '[[Aten KM0832 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131626002&pid=20060628154826001&layerid=subClass1]]');
740 $new_words[] = array (21 => '[[Aten KM0216 | http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411131626002&pid=20060417153950007&layerid=subClass1]]');
741 $new_words[] = array (21 => '[[Aten KM0432 | http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411131626002&pid=2006041715359007&layerid=subClass1]]');
742 $new_words[] = array (21 => '[[Aten KH1508 | http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411130954001&pid=20061101174038001&layerid=subClass1]]');
743 $new_words[] = array (21 => '[[Aten KH1516 | http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411130954001&pid=20061101175320001&layerid=subClass1]]');
744 $new_words[] = array (21 => '[[Aten KH0116 | http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411130954001&pid=20060411145734003&layerid=subClass1]]');
745 $new_words[] = array (21 => '[[Aten KH98 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=2007012911116003&pid=20061221104352001&layerid=subClass1]]');
746 $new_words[] = array (23 => '[[Aten KL1100 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=20071225113046001&layerid=subClass1]]');
747 $new_words[] = array (23 => '[[Aten KL1508 | http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411131050002&pid=20070710020717009&layerid=subClass1]]');
748 $new_words[] = array (23 => '[[Aten KL1516 | http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411131050002&pid=20070716232614001&layerid=subClass1]]');
749 $new_words[] = array (23 => '[[Aten KL9108 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=20060811153413009&layerid=subClass1]]');
750 $new_words[] = array (23 => '[[Aten KL9116 | http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411131050002&pid=2006081115384001&layerid=subClass1]]');
751 $new_words[] = array (23 => '[[Aten KL3116 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=20060913162532009&layerid=subClass1]]');
752 $new_words[] = array (23 => '[[Aten KL1116 | http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411131050002&pid=20060420101520005&layerid=subClass1]]');
753 $new_words[] = array (23 => '[[Aten CS1208DL | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=2005022413505007&layerid=subClass1]]');
754 $new_words[] = array (23 => '[[Aten CS1216DL | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=2005022413505007&layerid=subClass1]]');
755 $new_words[] = array (23 => '[[Aten CS1200L | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=20050224140854008&layerid=subClass1]]');
756 $new_words[] = array (23 => '[[Aten CL1758 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=20051229164553003&layerid=subClass1]]');
757 $new_words[] = array (23 => '[[Aten CL1208 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=2005072215482&layerid=subClass1]]');
758 $new_words[] = array (23 => '[[Aten CL1216 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=2005072215482&layerid=subClass1]]');
759 $new_words[] = array (23 => '[[Aten CL1200 | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=20050722165040002&layerid=subClass1]]');
760 $new_words[] = array (23 => '[[Aten ACS1208AL | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=2005022413597003&layerid=subClass1]]');
761 $new_words[] = array (23 => '[[Aten ACS1216AL | http://www.aten.com/products/productItem.php?pcid=2005010513171002&psid=20060411131050002&pid=2005022413597003&layerid=subClass1]]');
b922bd97
DO
762 $new_words[] = array (22 => '[[Tainet MUXpro 8216 | http://www.tainet.net/Product/muxpro820_8216.htm]]');
763 $new_words[] = array (22 => '[[Tainet Mercury 3600+ | http://www.tainet.net/Product/mercury.htm]]');
764 $new_words[] = array (22 => '[[Tainet Mercury 3820 | http://www.tainet.net/Product/mercury.htm]]');
765 $new_words[] = array (22 => '[[Tainet Mercury 3630 | http://www.tainet.net/Product/mercury.htm]]');
766 $new_words[] = array (22 => '[[Tainet Mercury 3630E | http://www.tainet.net/Product/mercury.htm]]');
767 $new_words[] = array (22 => '[[Tainet DSD-08A | http://www.tainet.net/Product/dsd08a.htm]]');
7fc5565c 768 $new_words[] = array (11 => '[[HP ProLiant DL160 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3580694.html]]');
7eee4cc8
DO
769 $new_words[] = array (11 => '[[HP ProLiant DL180 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3580698.html]]');
770 $new_words[] = array (11 => '[[HP ProLiant DL185 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3579900.html]]');
771 $new_words[] = array (11 => '[[HP ProLiant DL365 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3186080.html]]');
772 $new_words[] = array (11 => '[[HP ProLiant DL320s | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3232017.html]]');
773 $new_words[] = array (11 => '[[HP ProLiant DL320p | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3579703.html]]');
774 $new_words[] = array (11 => '[[HP ProLiant ML115 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328424-3330535.html]]');
775 $old_words = array();
776 $old_words[487] = '[[RAD FCD-IPM | http://www.rad.com/Article/0,6583,36426-E1_T1_or_Fractional_E1_T1_Modular_Access_Device_with_Integrated_Router,00.html]]';
777 $old_words[484] = '[[Cronyx FMUX-16-E3 | http://www.cronyx.ru/hardware/fmux16-e3.html]]';
778 $old_words[101] = '[[HP ProLiant DL140 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-1842838.html]]';
779 $old_words[102] = '[[HP ProLiant DL145 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3219755.html]]';
780 $old_words[103] = '[[HP ProLiant DL320 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3201178.html]]';
781 $old_words[104] = '[[HP ProLiant DL360 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-1121486.html]]';
782 $old_words[105] = '[[HP ProLiant DL380 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-1121516.html]]';
783 $old_words[106] = '[[HP ProLiant DL385 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3219233.html]]';
784 $old_words[107] = '[[HP ProLiant DL580 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328422-3454575.html]]';
785 $old_words[108] = '[[HP ProLiant DL585 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328422-3219717.html]]';
786 $old_words[109] = '[[HP ProLiant ML110 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328424-3577708.html]]';
787 $old_words[110] = '[[HP ProLiant ML150 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328424-3580609.html]]';
788 $old_words[111] = '[[HP ProLiant ML310 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-241477-3580655.html]]';
789 $old_words[112] = '[[HP ProLiant ML350 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-241477-1121586.html]]';
790 $old_words[113] = '[[HP ProLiant ML370 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-241477-1121474.html]]';
791 $old_words[114] = '[[HP ProLiant ML570 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328425-1842779.html]]';
792 foreach ($old_words as $dict_key => $dict_value)
48b11d4d 793 $query[] = "update Dictionary set dict_value = '${dict_value}' where dict_key = ${dict_key} limit 1";
f084b5c1
DO
794 foreach ($new_words as $dict_key => $tmp)
795 foreach ($tmp as $chapter_no => $dict_value)
796 $query[] = 'INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) ' .
797 "VALUES (${chapter_no}, ${dict_key}, '${dict_value}')";
48329bfb 798 $query[] = "alter database character set utf8";
b83abd29 799 $query[] = "update Config set varvalue = '0.14.12' where varname = 'DB_VERSION'";
7e7a8387 800 break; // --------------------------------------------
68a3ab9c 801 case '0.15.0':
f0b540a3
DO
802 $new_words[541] = array (12 => '[[Force10%GPASS%S2410CP | http://www.force10networks.com/products/s2410.asp]]');
803 $new_words[] = array (12 => '[[Force10%GPASS%S50N | http://www.force10networks.com/products/s50n.asp]]');
804 $new_words[] = array (12 => '[[Force10%GPASS%S50V | http://www.force10networks.com/products/s50v.asp]]');
805 $new_words[] = array (12 => '[[Force10%GPASS%S25P | http://www.force10networks.com/products/s25p.asp]]');
806 $new_words[] = array (12 => '[[Force10%GPASS%C150| http://www.force10networks.com/products/cseries.asp]]');
807 $new_words[] = array (12 => '[[Force10%GPASS%C300| http://www.force10networks.com/products/cseries.asp]]');
808 $new_words[] = array (12 => '[[Force10%GPASS%E300 | http://www.force10networks.com/products/eseries.asp]]');
809 $new_words[] = array (12 => '[[Force10%GPASS%E600 | http://www.force10networks.com/products/eseries.asp]]');
810 $new_words[] = array (12 => '[[Force10%GPASS%E1200 | http://www.force10networks.com/products/eseries.asp]]');
811 $new_words[] = array (12 => '[[NETGEAR%GPASS%JGS524F | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JGS524F.aspx]]');
812 $new_words[] = array (12 => '[[NETGEAR%GPASS%JGS516 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JGS516.aspx]]');
813 $new_words[] = array (12 => '[[NETGEAR%GPASS%JFS524 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JFS524.aspx]]');
814 $new_words[] = array (12 => '[[NETGEAR%GPASS%JFS524F | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JFS524F.aspx]]');
815 $new_words[] = array (12 => '[[NETGEAR%GPASS%JGS524 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JGS524.aspx]]');
816 $new_words[] = array (12 => '[[NETGEAR%GPASS%FS524 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/FS524.aspx]]');
817 $new_words[] = array (12 => '[[NETGEAR%GPASS%JFS516 | http://www.netgear.com/Products/Switches/UnmanagedSwitches/JFS516.aspx]]');
818 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7224R | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7224R.aspx]]');
819 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7248 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7248.aspx]]');
820 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7212 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7212.aspx]]');
821 $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM726S | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/FSM726S.aspx]]');
822 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7248R | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7248R.aspx]]');
823 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7224 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/GSM7224.aspx]]');
824 $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM750S | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/FSM750S.aspx]]');
825 $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM726 | http://www.netgear.com/Products/Switches/Layer2ManagedSwitches/FSM726.aspx]]');
826 $new_words[] = array (12 => '[[NETGEAR%GPASS%GS724TP | http://www.netgear.com/Products/Switches/SmartSwitches/GS724TP.aspx]]');
827 $new_words[] = array (12 => '[[NETGEAR%GPASS%GS748TS | http://www.netgear.com/Products/Switches/SmartSwitches/GS748TS.aspx]]');
828 $new_words[] = array (12 => '[[NETGEAR%GPASS%GS724T | http://www.netgear.com/Products/Switches/SmartSwitches/GS724T.aspx]]');
829 $new_words[] = array (12 => '[[NETGEAR%GPASS%FS728TP | http://www.netgear.com/Products/Switches/SmartSwitches/FS728TP.aspx]]');
830 $new_words[] = array (12 => '[[NETGEAR%GPASS%FS752TS | http://www.netgear.com/Products/Switches/SmartSwitches/FS752TS.aspx]]');
831 $new_words[] = array (12 => '[[NETGEAR%GPASS%FS728TS | http://www.netgear.com/Products/Switches/SmartSwitches/FS728TS.aspx]]');
832 $new_words[] = array (12 => '[[NETGEAR%GPASS%FS726T | http://www.netgear.com/Products/Switches/SmartSwitches/FS726T.aspx]]');
833 $new_words[] = array (12 => '[[NETGEAR%GPASS%GS748TP | http://www.netgear.com/Products/Switches/SmartSwitches/GS748TP.aspx]]');
834 $new_words[] = array (12 => '[[NETGEAR%GPASS%GS724TS | http://www.netgear.com/Products/Switches/SmartSwitches/GS724TS.aspx]]');
835 $new_words[] = array (12 => '[[NETGEAR%GPASS%GS748T | http://www.netgear.com/Products/Switches/SmartSwitches/GS748T.aspx]]');
836 $new_words[] = array (12 => '[[NETGEAR%GPASS%GS716T | http://www.netgear.com/Products/Switches/SmartSwitches/GS716T.aspx]]');
837 $new_words[] = array (12 => '[[NETGEAR%GPASS%FS752TPS | http://www.netgear.com/Products/Switches/SmartSwitches/FS752TPS.aspx]]');
838 $new_words[] = array (12 => '[[NETGEAR%GPASS%FS750T2 | http://www.netgear.com/Products/Switches/SmartSwitches/FS750T2.aspx]]');
839 $new_words[] = array (12 => '[[NETGEAR%GPASS%FS726TP | http://www.netgear.com/Products/Switches/SmartSwitches/FS726TP.aspx]]');
840 $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7328PS | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7328PS.aspx]]');
841 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7352S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7352S.aspx]]');
842 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7324 | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7324.aspx]]');
843 $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7326P | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7326P.aspx]]');
844 $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7352PS | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7352PS.aspx]]');
845 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7328FS | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7328FS.aspx]]');
846 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7328S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7328S.aspx]]');
847 $new_words[] = array (12 => '[[NETGEAR%GPASS%GSM7312 | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/GSM7312.aspx]]');
848 $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7328S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7328S.aspx]]');
849 $new_words[] = array (12 => '[[NETGEAR%GPASS%FSM7352S | http://www.netgear.com/Products/Switches/Layer3ManagedSwitches/FSM7352S.aspx]]');
850 $new_words[] = array (12 => '[[D-Link%GPASS%DES-6500 | http://www.dlink.com/products/?sec=0&pid=341]]');
851 $new_words[] = array (12 => '[[D-Link%GPASS%DWS-3227 | http://www.dlink.com/products/?sec=0&pid=506]]');
852 $new_words[] = array (12 => '[[D-Link%GPASS%DWS-3227P | http://www.dlink.com/products/?sec=0&pid=507]]');
853 $new_words[] = array (12 => '[[D-Link%GPASS%DWS-3250 | http://www.dlink.com/products/?sec=0&pid=468]]');
854 $new_words[] = array (12 => '[[D-Link%GPASS%DWS-1008 | http://www.dlink.com/products/?sec=0&pid=434]]');
855 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3612G | http://www.dlink.com/products/?sec=0&pid=557]]');
856 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3627 | http://www.dlink.com/products/?sec=0&pid=639]]');
857 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3650 | http://www.dlink.com/products/?sec=0&pid=640]]');
858 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3324SR | http://www.dlink.com/products/?sec=0&pid=294]]');
859 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3324SRi | http://www.dlink.com/products/?sec=0&pid=309]]');
860 $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3326GSR | http://www.dlink.com/products/?sec=0&pid=339]]');
861 $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3350SR | http://www.dlink.com/products/?sec=0&pid=340]]');
862 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3828 | http://www.dlink.com/products/?sec=0&pid=439]]');
863 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3828P | http://www.dlink.com/products/?sec=0&pid=440]]');
864 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3100-24 | http://www.dlink.com/products/?sec=0&pid=635]]');
865 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3100-24P | http://www.dlink.com/products/?sec=0&pid=636]]');
866 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3100-48 | http://www.dlink.com/products/?sec=0&pid=637]]');
867 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3100-48P | http://www.dlink.com/products/?sec=0&pid=638]]');
868 $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3227 | http://www.dlink.com/products/?sec=0&pid=483]]');
869 $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3227P | http://www.dlink.com/products/?sec=0&pid=497]]');
870 $new_words[] = array (12 => '[[D-Link%GPASS%DXS-3250 | http://www.dlink.com/products/?sec=0&pid=443]]');
871 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3024 | http://www.dlink.com/products/?sec=0&pid=404]]');
872 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3224TGR | http://www.dlink.com/products/?sec=0&pid=269]]');
873 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-3048 | http://www.dlink.com/products/?sec=0&pid=496]]');
874 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3228PA | http://www.dlink.com/products/?sec=0&pid=644]]');
875 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3028 | http://www.dlink.com/products/?sec=0&pid=630]]');
876 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3028P | http://www.dlink.com/products/?sec=0&pid=631]]');
877 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3052 | http://www.dlink.com/products/?sec=0&pid=632]]');
878 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3052P | http://www.dlink.com/products/?sec=0&pid=633]]');
879 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3010FA | http://www.dlink.com/products/?sec=0&pid=423]]');
880 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3010GA | http://www.dlink.com/products/?sec=0&pid=424]]');
881 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3010PA | http://www.dlink.com/products/?sec=0&pid=469]]');
882 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3226L | http://www.dlink.com/products/?sec=0&pid=298]]');
883 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3526 | http://www.dlink.com/products/?sec=0&pid=330]]');
884 $new_words[] = array (12 => '[[D-Link%GPASS%DES-3550 | http://www.dlink.com/products/?sec=0&pid=331]]');
885 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1216T | http://www.dlink.com/products/?sec=0&pid=324]]');
886 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1224T | http://www.dlink.com/products/?sec=0&pid=329]]');
887 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1248T | http://www.dlink.com/products/?sec=0&pid=367]]');
888 $new_words[] = array (12 => '[[D-Link%GPASS%DES-1316 | http://www.dlink.com/products/?sec=0&pid=353]]');
889 $new_words[] = array (12 => '[[D-Link%GPASS%DES-1228 | http://www.dlink.com/products/?sec=0&pid=540]]');
890 $new_words[] = array (12 => '[[D-Link%GPASS%DES-1228P | http://www.dlink.com/products/?sec=0&pid=541]]');
891 $new_words[] = array (12 => '[[D-Link%GPASS%DES-1252 | http://www.dlink.com/products/?sec=0&pid=555]]');
892 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1016D | http://www.dlink.com/products/?sec=0&pid=337]]');
893 $new_words[] = array (12 => '[[D-Link%GPASS%DGS-1024D | http://www.dlink.com/products/?sec=0&pid=338]]');
894 $new_words[] = array (12 => '[[D-Link%GPASS%DSS-24+ | http://www.dlink.com/products/?sec=0&pid=73]]');
895 $new_words[] = array (12 => '[[D-Link%GPASS%DES-1024D | http://www.dlink.com/products/?sec=0&pid=75]]');
896 $new_words[] = array (12 => '[[D-Link%GPASS%DES-1026G | http://www.dlink.com/products/?sec=0&pid=76]]');
897 $new_words[] = array (21 => '[[D-Link%GPASS%DKVM-16 | http://www.dlink.com/products/?sec=0&pid=228]]');
898 $new_words[] = array (21 => '[[D-Link%GPASS%DKVM-8E | http://www.dlink.com/products/?sec=0&pid=161]]');
899 $new_words[] = array (22 => '[[Raisecom%GPASS%RC702 | http://www.raisecom-international.com/p/RC702.htm]]');
900 $new_words[] = array (22 => '[[Raisecom%GPASS%RC702-GE | http://www.raisecom-international.com/p/RC702GE.htm]]');
901 $new_words[] = array (22 => '[[Raisecom%GPASS%ISCOM4300 | http://www.raisecom-international.com/p/ISCOM4300.htm]]');
902 $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-FE4E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
903 $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-FX4E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
904 $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-FE8E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
905 $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-FX8E1 | http://www.raisecom-international.com/p/RC953FE4E1.htm]]');
906 $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-8FE16E1 | http://www.raisecom-international.com/p/RC9538FE16E1.htm]]');
907 $new_words[] = array (22 => '[[Raisecom%GPASS%RC953E-3FE16E1 | http://www.raisecom-international.com/p/RC953E-3FE16E1.htm]]');
908 $new_words[] = array (22 => '[[Raisecom%GPASS%RC953-GESTM1 | http://www.raisecom-international.com/p/RC957.htm]]');
909 $new_words[] = array (22 => '[[Raisecom%GPASS%OPCOM3100-155 | http://www.raisecom-international.com/p/OPCOM3100.htm]]');
910 $new_words[] = array (22 => '[[Raisecom%GPASS%OPCOM3101-155 | http://www.raisecom-international.com/p/OPCOM3101.htm]]');
911 $new_words[] = array (22 => '[[Raisecom%GPASS%RC831-120 | http://www.raisecom-international.com/p/RC831.htm]]');
912 $new_words[] = array (22 => '[[Raisecom%GPASS%RC831-120-BL | http://www.raisecom-international.com/p/RC831.htm]]');
913 $new_words[] = array (22 => '[[Raisecom%GPASS%RC831-240 | http://www.raisecom-international.com/p/RC831.htm]]');
914 $new_words[] = array (22 => '[[Raisecom%GPASS%RC831-240E | http://www.raisecom-international.com/p/RC831.htm]]');
915 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-480GE-BL | http://www.raisecom-international.com/p/RCMS280X.htm]]');
916 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-120FE | http://www.raisecom-international.com/p/RCMS2801.htm]]');
917 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-120FE-BL | http://www.raisecom-international.com/p/RCMS2801.htm]]');
918 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-240FE | http://www.raisecom-international.com/p/RCMS2801.htm]]');
919 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-240FE-BL | http://www.raisecom-international.com/p/RCMS2801.htm]]');
920 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2801-240EFE | http://www.raisecom-international.com/p/RCMS2801.htm]]');
921 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-120FE | http://www.raisecom-international.com/p/RCMS2811.htm]]');
922 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-240FE | http://www.raisecom-international.com/p/RCMS2811.htm]]');
923 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-240FE-BL | http://www.raisecom-international.com/p/RCMS2811.htm]]');
924 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-480FE | http://www.raisecom-international.com/p/RCMS2811.htm]]');
925 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-480FE-BL | http://www.raisecom-international.com/p/RCMS2811.htm]]');
926 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2811-240EFE | http://www.raisecom-international.com/p/RCMS2811-240EFE.htm]]');
927 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2104-120 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
928 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2304-120 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
929 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2504-120 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
930 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2104-240 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
931 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2304-240 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
932 $new_words[] = array (22 => '[[Raisecom%GPASS%RCMS2504-240 | http://www.raisecom-international.com/p/RCMS2000120.htm]]');
933 $new_words[] = array (22 => '[[Raisecom%GPASS%RC801-120B | http://www.raisecom-international.com/p/RC800120.htm]]');
934 $new_words[] = array (22 => '[[Raisecom%GPASS%RC801-240B | http://www.raisecom-international.com/p/RC800120.htm]]');
935 $new_words[] = array (22 => '[[Raisecom%GPASS%RC801-480B | http://www.raisecom-international.com/p/RC800120.htm]]');
936 $new_words[] = array (22 => '[[Raisecom%GPASS%RC803-120B | http://www.raisecom-international.com/p/RC800120.htm]]');
937 $new_words[] = array (22 => '[[Raisecom%GPASS%RC803-240B | http://www.raisecom-international.com/p/RC800120.htm]]');
938 $new_words[] = array (22 => '[[Raisecom%GPASS%RC803-480B | http://www.raisecom-international.com/p/RC800120.htm]]');
939 $new_words[] = array (22 => '[[Raisecom%GPASS%RC805-120B | http://www.raisecom-international.com/p/RC800120.htm]]');
940 $new_words[] = array (22 => '[[Raisecom%GPASS%RC805-240B | http://www.raisecom-international.com/p/RC800120.htm]]');
941 $new_words[] = array (22 => '[[Raisecom%GPASS%RC805-480B | http://www.raisecom-international.com/p/RC800120.htm]]');
a0a199c7
DO
942 $new_words[] = array (2 => 'async serial (DB-9)'); // 681
943 $new_words[] = array (2 => 'async serial (DB-25)'); // 682
f0b540a3
DO
944 $new_words[] = array (12 => '[[Force10%GPASS%S2410P | http://www.force10networks.com/products/s2410.asp]]');
945 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X150-24t | http://www.extremenetworks.com/products/summit-x150.aspx]]');
946 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X150-48t | http://www.extremenetworks.com/products/summit-x150.aspx]]');
947 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X150-24p | http://www.extremenetworks.com/products/summit-x150.aspx]]');
948 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-24t | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
949 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-48t | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
950 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-24p | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
951 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-48p | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
952 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X250e-24x | http://www.extremenetworks.com/products/summit-x250e.aspx]]');
953 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450-24t | http://www.extremenetworks.com/products/summit-x450.aspx]]');
954 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450-24x | http://www.extremenetworks.com/products/summit-x450.aspx]]');
955 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450a-24t | http://www.extremenetworks.com/products/summit-x450a.aspx]]');
956 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450a-48t | http://www.extremenetworks.com/products/summit-x450a.aspx]]');
957 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450a-24x | http://www.extremenetworks.com/products/summit-x450a.aspx]]');
958 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450e-24p | http://www.extremenetworks.com/products/summit-x450e.aspx]]');
959 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit X450e-48p | http://www.extremenetworks.com/products/summit-x450e.aspx]]');
960 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 200-24fx | http://www.extremenetworks.com/products/summit-200.aspx]]');
961 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 200-24 | http://www.extremenetworks.com/products/summit-200.aspx]]');
962 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 200-48 | http://www.extremenetworks.com/products/summit-200.aspx]]');
963 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 300-24 | http://www.extremenetworks.com/products/summit-300.aspx]]');
964 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 300-48 | http://www.extremenetworks.com/products/summit-300.aspx]]');
965 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 400-24p | http://www.extremenetworks.com/products/summit-400-24p.aspx]]');
966 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 400-24t | http://www.extremenetworks.com/products/summit-400-24t.aspx]]');
967 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit 400-48t | http://www.extremenetworks.com/products/summit-400-48t.aspx]]');
968 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Summit48si | http://www.extremenetworks.com/products/summit-48si.aspx]]');
969 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Alpine 3804 | http://www.extremenetworks.com/products/Alpine-3800.aspx]]');
970 $new_words[] = array (12 => '[[Extreme Networks%GPASS%Alpine 3808 | http://www.extremenetworks.com/products/Alpine-3800.aspx]]');
971 $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 6808 | http://www.extremenetworks.com/products/blackdiamond-6800.aspx]]');
972 $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 8806 | http://www.extremenetworks.com/products/blackdiamond-8800.aspx]]');
973 $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 8810 | http://www.extremenetworks.com/products/blackdiamond-8800.aspx]]');
974 $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 10808 | http://www.extremenetworks.com/products/blackdiamond-10808.aspx]]');
975 $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 12802R | http://www.extremenetworks.com/products/blackdiamond-12800r.aspx]]');
976 $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 12804R | http://www.extremenetworks.com/products/blackdiamond-12800r.aspx]]');
977 $new_words[] = array (12 => '[[Extreme Networks%GPASS%BlackDiamond 12804C | http://www.extremenetworks.com/products/blackdiamond-12804c.aspx]]');
978 $new_words[] = array (17 => '[[Cisco%GPASS%ASR 1002 | http://cisco.com/en/US/products/ps9436/index.html]]');
979 $new_words[] = array (17 => '[[Cisco%GPASS%ASR 1004 | http://cisco.com/en/US/products/ps9437/index.html]]');
980 $new_words[] = array (17 => '[[Cisco%GPASS%ASR 1006 | http://cisco.com/en/US/products/ps9438/index.html]]');
981 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.3 | http://openbsd.org/33.html]]');
982 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.4 | http://openbsd.org/34.html]]');
983 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.5 | http://openbsd.org/35.html]]');
984 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.6 | http://openbsd.org/36.html]]');
985 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.7 | http://openbsd.org/37.html]]');
986 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.8 | http://openbsd.org/38.html]]');
987 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 3.9 | http://openbsd.org/39.html]]');
988 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 4.0 | http://openbsd.org/40.html]]');
989 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 4.1 | http://openbsd.org/41.html]]');
990 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 4.2 | http://openbsd.org/42.html]]');
991 $new_words[] = array (13 => '[[BSD%GSKIP%OpenBSD 4.3 | http://openbsd.org/43.html]]');
992 $new_words[] = array (12 => '[[Cisco Catalyst 4900M | http://www.cisco.com/en/US/products/ps9310/index.html]]');
993 $new_words[] = array (13 => '[[BSD%GSKIP%FreeBSD 7.x | http://www.freebsd.org/releases/7.0R/announce.html]]');
994 $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 2.0 | http://netbsd.org/releases/formal-2.0/]]');
995 $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 2.1 | http://netbsd.org/releases/formal-2.0/NetBSD-2.1.html]]');
996 $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 3.0 | http://netbsd.org/releases/formal-3/]]');
997 $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 3.1 | http://netbsd.org/releases/formal-3/NetBSD-3.1.html]]');
998 $new_words[] = array (13 => '[[BSD%GSKIP%NetBSD 4.0 | http://netbsd.org/releases/formal-4/NetBSD-4.0.html]]');
999 $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2016 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16470B]]');
1000 $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2024 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16471B]]');
1001 $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2126-G | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16472]]');
1002 $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2816 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16478]]');
1003 $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2824 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16479]]');
1004 $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2226 Plus | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16475CS]]');
1005 $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]]');
1006 $new_words[] = array (12 => '[[3Com%GPASS%Baseline 2250 Plus | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16476CS]]');
1007 $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]]');
1008 $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]]');
1009 $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]]');
1010 $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]]');
1011 $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]]');
1012 $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]]');
1013 $new_words[] = array (12 => '[[3Com%GPASS%4200 26-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17300A&pathtype=purchase]]');
1014 $new_words[] = array (12 => '[[3Com%GPASS%4200 28-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17304A&pathtype=purchase]]');
1015 $new_words[] = array (12 => '[[3Com%GPASS%4200 50-port | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17302A&pathtype=purchase]]');
1016 $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]]');
1017 $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]]');
1018 $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]]');
1019 $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]]');
1020 $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]]');
1021 $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]]');
1022 $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]]');
1023 $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]]');
1024 $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]]');
1025 $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]]');
1026 $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]]');
1027 $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]]');
1028 $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]]');
1029 $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]]');
1030 $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]]');
1031 $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]]');
1032 $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]]');
1033 $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]]');
1034 $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]]');
1035 $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]]');
1036 $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]]');
1037 $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]]');
1038 $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]]');
1039 $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]]');
1040 $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]]');
1041 $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]]');
1042 $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]]');
1043 $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]]');
1044 $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]]');
1045 $new_words[] = array (12 => '[[3Com%GPASS%7754 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16894]]');
1046 $new_words[] = array (12 => '[[3Com%GPASS%7757 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16895]]');
1047 $new_words[] = array (12 => '[[3Com%GPASS%7758 | http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase&sku=3C16896]]');
1048 $new_words[] = array (12 => '[[3Com%GPASS%8807 | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17502A&pathtype=purchase]]');
1049 $new_words[] = array (12 => '[[3Com%GPASS%8810 | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17501A&pathtype=purchase]]');
1050 $new_words[] = array (12 => '[[3Com%GPASS%8814 | http://www.3com.com/products/en_US/detail.jsp?tab=features&sku=3C17500A&pathtype=purchase]]');
b1bce3b6 1051 $new_words[] = array (13 => 'Linux%GSKIP%RHF9');
d8515eff
DO
1052 $query[] = "insert into PortCompat (type1, type2) values (29, 681)";
1053 $query[] = "insert into PortCompat (type1, type2) values (29, 682)";
1054 $query[] = "insert into PortCompat (type1, type2) values (681, 29)";
1055 $query[] = "insert into PortCompat (type1, type2) values (681, 681)";
1056 $query[] = "insert into PortCompat (type1, type2) values (681, 682)";
1057 $query[] = "insert into PortCompat (type1, type2) values (682, 29)";
1058 $query[] = "insert into PortCompat (type1, type2) values (682, 681)";
1059 $query[] = "insert into PortCompat (type1, type2) values (682, 682)";
71f42cdb
DO
1060 $query[] =
1061"
f9bc186f
DO
1062CREATE TABLE `TagStorage` (
1063 `target_realm` enum('object','ipv4net','rack','ipv4vs','ipv4rspool') NOT NULL default 'object',
1064 `target_id` int(10) unsigned NOT NULL,
71f42cdb 1065 `tag_id` int(10) unsigned default NULL,
f9bc186f
DO
1066 UNIQUE KEY `entity_tag` (`target_realm`,`target_id`,`tag_id`),
1067 KEY `target_id` (`target_id`)
71f42cdb
DO
1068) TYPE=MyISAM;
1069";
1070 $query[] =
1071"
1072CREATE TABLE `TagTree` (
1073 `id` int(10) unsigned NOT NULL auto_increment,
1074 `parent_id` int(10) unsigned default NULL,
1075 `tag` char(255) default NULL,
1076 PRIMARY KEY (`id`),
1077 UNIQUE KEY `tag` (`tag`)
1078) TYPE=MyISAM;
1079";
a0a199c7
DO
1080 $old_words[29] = 'async serial (RJ-45)';
1081
f0b540a3
DO
1082 $old_words[43] = 'IBM xSeries%GPASS%305';
1083 $old_words[44] = 'IBM xSeries%GPASS%306';
1084 $old_words[45] = 'IBM xSeries%GPASS%306m';
1085 $old_words[46] = 'IBM xSeries%GPASS%326m';
1086 $old_words[47] = 'IBM xSeries%GPASS%330';
1087 $old_words[48] = 'IBM xSeries%GPASS%335';
1088 $old_words[54] = 'IBM xSeries%GPASS%346';
1089 $old_words[59] = 'IBM xSeries%GPASS%326';
1090 $old_words[68] = 'IBM xSeries%GPASS%3250';
1091 $old_words[69] = 'IBM xSeries%GPASS%3455';
1092 $old_words[70] = 'IBM xSeries%GPASS%3550';
1093 $old_words[71] = 'IBM xSeries%GPASS%3650';
1094 $old_words[72] = 'IBM xSeries%GPASS%3655';
1095 $old_words[73] = 'IBM xSeries%GPASS%3650 T';
1096 $old_words[74] = 'IBM xSeries%GPASS%3755';
1097 $old_words[75] = 'IBM xSeries%GPASS%3850';
9d26ec21 1098
f0b540a3
DO
1099 $old_words[92] = 'IBM pSeries%GPASS%185';
1100 $old_words[93] = 'IBM pSeries%GPASS%505';
1101 $old_words[94] = 'IBM pSeries%GPASS%505Q';
1102 $old_words[95] = 'IBM pSeries%GPASS%510';
1103 $old_words[96] = 'IBM pSeries%GPASS%510Q';
1104 $old_words[97] = 'IBM pSeries%GPASS%520';
1105 $old_words[98] = 'IBM pSeries%GPASS%520Q';
1106 $old_words[99] = 'IBM pSeries%GPASS%550';
1107 $old_words[100] = 'IBM pSeries%GPASS%550Q';
9d26ec21 1108
f0b540a3
DO
1109 $old_words[212] = 'Linux%GSKIP%RHFC1';
1110 $old_words[213] = 'Linux%GSKIP%RHFC2';
1111 $old_words[214] = 'Linux%GSKIP%RHFC3';
1112 $old_words[215] = 'Linux%GSKIP%RHFC4';
1113 $old_words[216] = 'Linux%GSKIP%RHFC5';
1114 $old_words[217] = 'Linux%GSKIP%RHFC6';
1115 $old_words[232] = 'Linux%GSKIP%RHF7';
1116 $old_words[242] = 'Linux%GSKIP%RHF8';
1117 $old_words[225] = 'Linux%GSKIP%RHEL1';
1118 $old_words[226] = 'Linux%GSKIP%RHEL2';
1119 $old_words[227] = 'Linux%GSKIP%RHEL3';
1120 $old_words[228] = 'Linux%GSKIP%RHEL4';
1121 $old_words[436] = 'Linux%GSKIP%RHEL5';
9d26ec21 1122
f0b540a3
DO
1123 $old_words[229] = 'Linux%GSKIP%ALTLinux Master 2.0';
1124 $old_words[230] = 'Linux%GSKIP%ALTLinux Master 2.2';
1125 $old_words[231] = 'Linux%GSKIP%ALTLinux Master 2.4';
1126 $old_words[243] = 'Linux%GSKIP%ALTLinux Master 4.0';
1127 $old_words[231] = 'Linux%GSKIP%ALTLinux Master 2.4';
1128 $old_words[422] = 'Linux%GSKIP%ALTLinux Server 4.0';
1129 $old_words[423] = 'Linux%GSKIP%ALTLinux Sisyphus';
9d26ec21 1130
f0b540a3
DO
1131 $old_words[233] = 'Linux%GSKIP%SLES10';
1132 $old_words[424] = 'Linux%GSKIP%openSUSE 10.0';
1133 $old_words[425] = 'Linux%GSKIP%openSUSE 10.1';
1134 $old_words[426] = 'Linux%GSKIP%openSUSE 10.2';
1135 $old_words[427] = 'Linux%GSKIP%openSUSE 10.3';
9d26ec21 1136
f0b540a3
DO
1137 $old_words[428] = 'Linux%GSKIP%Ubuntu 4.10';
1138 $old_words[429] = 'Linux%GSKIP%Ubuntu 5.04';
1139 $old_words[430] = 'Linux%GSKIP%Ubuntu 5.10';
1140 $old_words[431] = 'Linux%GSKIP%Ubuntu 6.06 LTS';
1141 $old_words[432] = 'Linux%GSKIP%Ubuntu 6.10';
1142 $old_words[433] = 'Linux%GSKIP%Ubuntu 7.04';
1143 $old_words[434] = 'Linux%GSKIP%Ubuntu 7.10';
1144 $old_words[435] = 'Linux%GSKIP%Ubuntu 8.04 LTS';
9d26ec21 1145
f0b540a3
DO
1146 $old_words[418] = 'Linux%GSKIP%Debian 2.0 (hamm)';
1147 $old_words[419] = 'Linux%GSKIP%Debian 2.1 (slink)';
1148 $old_words[420] = 'Linux%GSKIP%Debian 2.2 (potato)';
1149 $old_words[234] = 'Linux%GSKIP%Debian 3.0 (woody)';
1150 $old_words[235] = 'Linux%GSKIP%Debian 3.1 (sarge)';
1151 $old_words[421] = 'Linux%GSKIP%Debian 4.0 (etch)';
9d26ec21 1152
f0b540a3
DO
1153 $old_words[236] = 'BSD%GSKIP%FreeBSD 1.x';
1154 $old_words[237] = 'BSD%GSKIP%FreeBSD 2.x';
1155 $old_words[238] = 'BSD%GSKIP%FreeBSD 3.x';
1156 $old_words[239] = 'BSD%GSKIP%FreeBSD 4.x';
1157 $old_words[240] = 'BSD%GSKIP%FreeBSD 5.x';
1158 $old_words[241] = 'BSD%GSKIP%FreeBSD 6.x';
1159 $old_words[732] = '[[BSD%GSKIP%FreeBSD 7.0 | http://www.freebsd.org/releases/7.0R/announce.html]]';
9d26ec21 1160
f0b540a3
DO
1161 $old_words[441] = 'Linux%GSKIP%CentOS-2';
1162 $old_words[442] = 'Linux%GSKIP%CentOS-3';
1163 $old_words[443] = 'Linux%GSKIP%CentOS-4';
1164 $old_words[444] = 'Linux%GSKIP%CentOS-5';
9d26ec21 1165
f0b540a3
DO
1166 $old_words[218] = 'BSD%GSKIP%Solaris 8';
1167 $old_words[219] = 'BSD%GSKIP%Solaris 9';
1168 $old_words[220] = 'BSD%GSKIP%Solaris 10';
9d26ec21 1169
f0b540a3
DO
1170 $old_words[49] = 'Sun%GPASS%Ultra 10';
1171 $old_words[50] = 'Sun%GPASS%Enterprise 420R';
1172 $old_words[51] = '[[Sun%GPASS%Fire X2100 | http://www.sun.com/servers/entry/x2100/]]';
1173 $old_words[52] = '[[Sun%GPASS%Fire E4900 | http://www.sun.com/servers/midrange/sunfire_e4900/index.xml]]';
1174 $old_words[53] = 'Sun%GPASS%Netra X1';
1175 $old_words[57] = 'Sun%GPASS%Fire V210';
1176 $old_words[58] = 'Sun%GPASS%Fire V240';
1177 $old_words[60] = 'Sun%GPASS%Netra t1 105';
1178 $old_words[61] = 'Sun%GPASS%Enterprise 4500';
1179 $old_words[64] = 'Sun%GPASS%Ultra 5';
1180 $old_words[76] = '[[Sun%GPASS%Fire X4600 | http://www.sun.com/servers/x64/x4600/]]';
1181 $old_words[77] = '[[Sun%GPASS%Fire X4500 | http://www.sun.com/servers/x64/x4500/]]';
1182 $old_words[78] = '[[Sun%GPASS%Fire X4200 | http://www.sun.com/servers/entry/x4200/]]';
1183 $old_words[79] = '[[Sun%GPASS%Fire X4100 | http://www.sun.com/servers/entry/x4100/]]';
1184 $old_words[80] = '[[Sun%GPASS%Fire X2100 M2 | http://www.sun.com/servers/entry/x2100/]]';
1185 $old_words[81] = '[[Sun%GPASS%Fire X2200 M2 | http://www.sun.com/servers/x64/x2200/]]';
1186 $old_words[82] = 'Sun%GPASS%Fire V40z';
1187 $old_words[83] = 'Sun%GPASS%Fire V125';
1188 $old_words[84] = '[[Sun%GPASS%Fire V215 | http://www.sun.com/servers/entry/v215/]]';
1189 $old_words[85] = '[[Sun%GPASS%Fire V245 | http://www.sun.com/servers/entry/v245/]]';
1190 $old_words[86] = '[[Sun%GPASS%Fire V445 | http://www.sun.com/servers/entry/v445/]]';
1191 $old_words[87] = 'Sun%GPASS%Fire V440';
1192 $old_words[88] = '[[Sun%GPASS%Fire V490 | http://www.sun.com/servers/midrange/v490/]]';
1193 $old_words[89] = '[[Sun%GPASS%Fire V890 | http://www.sun.com/servers/midrange/v890/]]';
1194 $old_words[90] = '[[Sun%GPASS%Fire E2900 | http://www.sun.com/servers/midrange/sunfire_e2900/index.xml]]';
1195 $old_words[91] = 'Sun%GPASS%Fire V1280';
9d26ec21 1196
f0b540a3
DO
1197 $old_words[55] = 'Dell PowerEdge%GPASS%1650';
1198 $old_words[56] = 'Dell PowerEdge%GPASS%2850';
1199 $old_words[62] = 'Dell PowerEdge%GPASS%1950';
1200 $old_words[63] = 'Dell PowerEdge%GPASS%1550';
1201 $old_words[65] = 'Dell PowerEdge%GPASS%2950';
1202 $old_words[66] = 'Dell PowerEdge%GPASS%650';
1203 $old_words[67] = 'Dell PowerEdge%GPASS%4600';
1204 $old_words[355] = 'Dell PowerEdge%GPASS%6850';
1205 $old_words[356] = 'Dell PowerEdge%GPASS%6950';
1206 $old_words[357] = 'Dell PowerEdge%GPASS%R900';
1207 $old_words[358] = 'Dell PowerEdge%GPASS%4400';
1208 $old_words[359] = 'Dell PowerEdge%GPASS%2650';
1209 $old_words[360] = 'Dell PowerEdge%GPASS%2550';
1210 $old_words[361] = 'Dell PowerEdge%GPASS%750';
1211 $old_words[362] = 'Dell PowerEdge%GPASS%2450';
1212 $old_words[363] = 'Dell PowerEdge%GPASS%850';
1213 $old_words[364] = 'Dell PowerEdge%GPASS%1850';
1214 $old_words[365] = 'Dell PowerEdge%GPASS%860';
1215 $old_words[366] = 'Dell PowerEdge%GPASS%2900';
1216 $old_words[367] = 'Dell PowerEdge%GPASS%2970';
1217 $old_words[368] = 'Dell PowerEdge%GPASS%SC1435';
df4c3309 1218
f0b540a3
DO
1219 $old_words[101] = '[[HP ProLiant%GPASS%DL140 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-1842838.html]]';
1220 $old_words[102] = '[[HP ProLiant%GPASS%DL145 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3219755.html]]';
1221 $old_words[103] = '[[HP ProLiant%GPASS%DL320 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3201178.html]]';
1222 $old_words[104] = '[[HP ProLiant%GPASS%DL360 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-1121486.html]]';
1223 $old_words[105] = '[[HP ProLiant%GPASS%DL380 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-1121516.html]]';
1224 $old_words[106] = '[[HP ProLiant%GPASS%DL385 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3219233.html]]';
1225 $old_words[107] = '[[HP ProLiant%GPASS%DL580 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328422-3454575.html]]';
1226 $old_words[108] = '[[HP ProLiant%GPASS%DL585 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328422-3219717.html]]';
1227 $old_words[109] = '[[HP ProLiant%GPASS%ML110 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328424-3577708.html]]';
1228 $old_words[110] = '[[HP ProLiant%GPASS%ML150 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328424-3580609.html]]';
1229 $old_words[111] = '[[HP ProLiant%GPASS%ML310 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-241477-3580655.html]]';
1230 $old_words[112] = '[[HP ProLiant%GPASS%ML350 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-241477-1121586.html]]';
1231 $old_words[113] = '[[HP ProLiant%GPASS%ML370 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-241477-1121474.html]]';
1232 $old_words[114] = '[[HP ProLiant%GPASS%ML570 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328425-1842779.html]]';
1233 $old_words[534] = '[[HP ProLiant%GPASS%DL160 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3580694.html]]';
1234 $old_words[535] = '[[HP ProLiant%GPASS%DL180 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3580698.html]]';
1235 $old_words[536] = '[[HP ProLiant%GPASS%DL185 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-3328421-3579900.html]]';
1236 $old_words[537] = '[[HP ProLiant%GPASS%DL365 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3186080.html]]';
1237 $old_words[538] = '[[HP ProLiant%GPASS%DL320s | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3232017.html]]';
1238 $old_words[539] = '[[HP ProLiant%GPASS%DL320p | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-3328412-241644-241475-3579703.html]]';
1239 $old_words[540] = '[[HP ProLiant%GPASS%ML115 | http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/15351-15351-241434-241646-3328424-3330535.html]]';
a0a199c7 1240
86fc1740
DO
1241 foreach ($new_words as $dict_key => $tmp)
1242 foreach ($tmp as $chapter_no => $dict_value)
1243 $query[] = 'INSERT INTO `Dictionary` (`chapter_no`, `dict_key`, `dict_value`) ' .
1244 "VALUES (${chapter_no}, ${dict_key}, '${dict_value}')";
9d26ec21
DO
1245 foreach ($old_words as $dict_key => $dict_value)
1246 $query[] = "update Dictionary set dict_value = '${dict_value}' where dict_key = ${dict_key} limit 1";
3526c7c6 1247 $query[] = "alter table Rack add unique name_in_row (row_id, name)";
dc327897 1248 $query[] = "delete from UserPermission where page = 'help'";
5cffef42 1249 $query[] = "alter table Config change column varvalue varvalue char(255) NOT NULL";
194e3748
DO
1250 $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('SHOW_EXPLICIT_TAGS','yes','string','no','no','Show explicit tags')";
1251 $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('SHOW_IMPLICIT_TAGS','yes','string','no','no','Show implicit tags')";
1252 $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('SHOW_AUTOMATIC_TAGS','no','string','no','no','Show automatic tags')";
eeb4a5d8
DO
1253 // Decommission the Protocols dictionary chapter.
1254 $query[] = "alter table PortForwarding add column proto_new enum('TCP','UDP') not null default 'TCP' after proto";
1255 $query[] = "update PortForwarding set proto_new = 'TCP' where proto = 336";
1256 $query[] = "update PortForwarding set proto_new = 'UDP' where proto = 337";
1257 $query[] = "alter table PortForwarding drop primary key";
1258 $query[] = "alter table PortForwarding drop column proto";
1259 $query[] = "alter table PortForwarding change column proto_new proto enum('TCP','UDP') not null default 'TCP'";
1260 $query[] = "alter table PortForwarding add primary key (`object_id`,`proto`,`localip`,`localport`,`remoteip`,`remoteport`)";
1261 $query[] = "delete from Dictionary where chapter_no = 20";
1262 $query[] = "delete from Chapter where chapter_no = 20";
68a3ab9c 1263 $query[] = "update Config set varvalue = '0.15.0' where varname = 'DB_VERSION'";
86fc1740 1264 break; // --------------------------------------------
3861eef6
DO
1265 case '0.15.1':
1266 $query[] = "INSERT INTO `Config` VALUES ('IPV4_AUTO_RELEASE','1','uint','no','no','Auto-release IPv4 addresses on allocation')";
d824020c 1267 $query[] = "update Config set varvalue = '0.15.1' where varname = 'DB_VERSION'";
3861eef6 1268 break;
fe782367 1269 case '0.16.0':
04402f63
DO
1270 if (!defined ('MB_CASE_LOWER'))
1271 {
1272 die ('<b>Cannot upgrade due to multibyte extension not present. See the README for details.</b>');
1273 }
fe782367
DO
1274 $query[] = 'alter table TagStorage modify column tag_id int(10) unsigned not null;';
1275 $query[] = "alter table TagStorage modify column target_realm enum('object','ipv4net','rack','ipv4vs','ipv4rspool','user');";
1276 $query[] = "delete from UserPermission where page = 'objects' and tab = 'newobj'";
ecbdebd6
DO
1277 $query[] = "update UserPermission set tab = 'addmore' where page = 'objects' and (tab = 'newmulti' or tab = 'newobj')";
1278 $query[] = "update UserPermission set tab = 'livevlans' where tab = 'switchvlans'";
fe782367 1279 $query[] = "update UserPermission set page = 'userlist' where page = 'accounts'";
2bb798a3
DO
1280 $query[] = "update UserPermission set page = 'ipv4rsplist' where page = 'rspools'";
1281 $query[] = "update UserPermission set page = 'ipv4vslist' where page = 'vservices'";
1282 $query[] = "update UserPermission set page = 'ipv4vs' where page = 'vservice'";
0e692350 1283 $query[] = "update UserPermission set page = 'ipv4rsp' where page = 'rspool'";
fe782367
DO
1284 $query[] = "create table Script (script_name char(64) not null primary key, script_text text)";
1285 // Do the same getUserPermissions() does, but without the function.
1286 // We need to generate more specific rules first, otherwise they will
1287 // never work.
1288 $tq =
1289 "select UserPermission.user_id, user_name, page, tab, access from " .
1290 "UserPermission natural left join UserAccount where (user_name is not null) or " .
1291 "(user_name is null and UserPermission.user_id = 0) order by user_name desc, page desc, tab desc";
1292 $tr = $dbxlink->query ($tq);
95977892 1293 $code = "allow {$userid_1}\n";
fe782367
DO
1294 while ($row = $tr->fetch (PDO::FETCH_ASSOC))
1295 {
d91674c6 1296 $conjunction = '';
fe782367 1297 $rule = $row['access'] == 'yes' ? 'allow' : 'deny';
d91674c6
DO
1298 if ($row['user_id'] != 0)
1299 {
1300 $rule .= " {\$username_${row['user_name']}}";
1301 $conjunction = 'and ';
1302 }
1303 if ($row['page'] != '%')
1304 {
1305 $rule .= " ${conjunction}{\$page_${row['page']}}";
1306 $conjunction = 'and ';
1307 }
1308 if ($row['tab'] != '%')
1309 $rule .= " ${conjunction}{\$tab_${row['tab']}}";
fe782367
DO
1310 if ($rule == 'allow' or $rule == 'deny')
1311 continue;
d91674c6 1312 $code .= "${rule}\n";
fe782367
DO
1313 }
1314 $query[] = "insert into Script (script_name, script_text) values ('RackCode', '${code}')";
1315 $query[] = 'drop table UserPermission';
849f46c3 1316 $query[] = "update Config set varvalue = '0.16.0' where varname = 'DB_VERSION'";
fe782367 1317 break;
fbbb74fb
DO
1318 default:
1319 showError ("executeUpgradeBatch () failed, because batch '${batchid}' isn't defined");
1320 die;
1321 break;
1322 }
fbbb74fb 1323 $failures = array();
ce109ff2 1324 $ndots = 0;
22e40283 1325 echo "<pre>Executing database upgrade batch '${batchid}':\n";
fbbb74fb
DO
1326 foreach ($query as $q)
1327 {
1328 $result = $dbxlink->query ($q);
1329 if ($result != NULL)
fbbb74fb 1330 echo '.';
758fe24c
DO
1331 else
1332 {
1333 echo '!';
1334 $errorInfo = $dbxlink->errorInfo();
1335 $failures[] = array ($q, $errorInfo[2]);
1336 }
1337 if (++$ndots == 50)
1338 {
1339 echo "\n";
15a50768 1340 flush();
758fe24c 1341 $ndots = 0;
fbbb74fb 1342 }
fbbb74fb
DO
1343 }
1344 echo '<br>';
1345 if (!count ($failures))
1346 echo "No errors!\n";
1347 else
1348 {
7fc5565c 1349 echo "The following queries failed:\n<font color=red>";
fbbb74fb
DO
1350 foreach ($failures as $f)
1351 {
1352 list ($q, $i) = $f;
1353 echo "${q} // ${i}\n";
1354 }
1355 }
7fc5565c 1356 echo '</font></pre>';
fbbb74fb
DO
1357}
1358
1359// ******************************************************************
1360//
1361// Execution starts here
1362//
1363// ******************************************************************
1364
1365$root = (empty($_SERVER['HTTPS'])?'http':'https').
1366 '://'.
1367 (isset($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:($_SERVER['SERVER_NAME'].($_SERVER['SERVER_PORT']=='80'?'':$_SERVER['SERVER_PORT']))).
54c2a7a8
DO
1368 dirname($_SERVER['PHP_SELF']);
1369if (substr ($root, -1) != '/')
1370 $root .= '/';
fbbb74fb
DO
1371
1372// The below will be necessary as long as we rely on showError()
1373require_once 'inc/interface.php';
1374
1375require_once 'inc/config.php';
1376require_once 'inc/database.php';
1377if (file_exists ('inc/secret.php'))
1378 require_once 'inc/secret.php';
1379else
1380 die ("Database connection parameters are read from inc/secret.php file, " .
1381 "which cannot be found.\nCopy provided inc/secret-sample.php to " .
1382 "inc/secret.php and modify to your setup.\n\nThen reload the page.");
1383
1384try
1385{
1386 $dbxlink = new PDO ($pdo_dsn, $db_username, $db_password);
1387}
1388catch (PDOException $e)
1389{
1390 die ("Database connection failed:\n\n" . $e->getMessage());
1391}
1392
fbbb74fb
DO
1393// Now we need to be sure that the current user is the administrator.
1394// The rest doesn't matter within this context.
1395// We still continue to use the current authenticator though, but this will
1396// last only till the UserAccounts remains the same. After that this file
1397// will have to dig into the DB for the user accounts.
1398require_once 'inc/auth.php';
1399
1400// This will not fail sanely, because getUserAccounts() depends on showError()
1401$accounts = getUserAccounts();
1402
d78fdaea
DO
1403// Only administrator is always authenticated locally, so reject others
1404// for authenticate() to succeed.
99ee5479
DO
1405
1406if
1407(
1408 !isset ($_SERVER['PHP_AUTH_USER']) or
1409 !isset ($_SERVER['PHP_AUTH_PW']) or
1410 $accounts[$_SERVER['PHP_AUTH_USER']]['user_id'] != 1 or
1411 !authenticated_via_database (escapeString ($_SERVER['PHP_AUTH_USER']), escapeString ($_SERVER['PHP_AUTH_PW']))
1412)
1413{
c0142c01
DO
1414 header ('WWW-Authenticate: Basic realm="RackTables upgrade"');
1415 header ('HTTP/1.0 401 Unauthorized');
1416 showError ('You must be authenticated as an administrator to complete the upgrade.');
99ee5479
DO
1417 die;
1418}
fbbb74fb
DO
1419
1420$dbver = getDatabaseVersion();
04402f63
DO
1421echo 'Code version == ' . CODE_VERSION . '<br>';
1422echo 'Database version == ' . $dbver . '<br>';
fbbb74fb 1423if ($dbver == CODE_VERSION)
758fe24c 1424{
fbbb74fb
DO
1425 die ("<p align=justify>Your database seems to be up-to-date. " .
1426 "Now the best thing to do would be to follow to the <a href='${root}'>main page</a> " .
1427 "and explore your data. Have a nice day.</p>");
758fe24c 1428}
fbbb74fb
DO
1429
1430foreach (getDBUpgradePath ($dbver, CODE_VERSION) as $batchid)
1431 executeUpgradeBatch ($batchid);
1432
1433echo '<br>Database version == ' . getDatabaseVersion();
1434echo "<p align=justify>Your database seems to be up-to-date. " .
1435 "Now the best thing to do would be to follow to the <a href='${root}'>main page</a> " .
1436 "and explore your data. Have a nice day.</p>";
1437
1438?>