View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
463 | RackTables | default | public | 2011-08-23 20:30 | 2011-08-28 11:38 |
Reporter | Assigned To | infrastation | |||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 0.19.7 | ||||
Target Version | 0.19.8 | Fixed in Version | 0.19.8 | ||
Summary | 463: Autoport-Startnumber | ||||
Description | I've added this Startnumber feature to the Autoports function(post on the mailing-list). Now i added backwards compatibility to this funktion. I attached the patch file | ||||
Tags | No tags attached. | ||||
Attached Files | autoports.diff (817 bytes)
Index: inc/functions.php =================================================================== --- inc/functions.php (revision 4754) +++ inc/functions.php (working copy) @@ -998,13 +998,15 @@ foreach (explode ('+', $portlist) as $product) { $tmp = explode ('*', $product); - if (count ($tmp) != 3) + if (count ($tmp) > 4 || count ($tmp) < 3) continue; + //the new format looks like this <number of ports>*<port_type_id>[*<sprintf_name>*<startnumber>] $nports = $tmp[0]; $port_type = $tmp[1]; $format = $tmp[2]; + $startnum = isset($tmp[3]) ? $tmp[3] : 0; for ($i = 0; $i < $nports; $i++) - $ret[] = array ('type' => $port_type, 'name' => @sprintf ($format, $i)); + $ret[] = array ('type' => $port_type, 'name' => @sprintf ($format, ($i+$startnum))); } } return $ret; | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-08-23 20:30 |
|
New Issue | |
2011-08-23 20:30 |
|
File Added: autoports.diff | |
2011-08-28 11:30 | infrastation | Status | new => assigned |
2011-08-28 11:30 | infrastation | Assigned To | => infrastation |
2011-08-28 11:38 | infrastation | Note Added: 0000411 | |
2011-08-28 11:38 | infrastation | Status | assigned => closed |
2011-08-28 11:38 | infrastation | Resolution | open => fixed |
2011-08-28 11:38 | infrastation | Fixed in Version | => 0.19.8 |
2011-08-28 11:38 | infrastation | Target Version | => 0.19.8 |