X-Git-Url: https://code.racktables.org/racktables/blobdiff_plain/4e60a63b7e596696a3d8086dc0a28b959ad878d1..ab1283b7824b4995b33e8cc9e29f765804cf67c2:/inc/interface.php diff --git a/inc/interface.php b/inc/interface.php index a733f960..3eaa2d29 100644 --- a/inc/interface.php +++ b/inc/interface.php @@ -2101,16 +2101,14 @@ function renderIPv4SpaceEditor () echo "

\n"; finishPortlet(); - $addrspaceList = listCells ('ipv4net'); - array_walk ($addrspaceList, 'amplifyCell'); - if (count ($addrspaceList)) + if (count ($addrspaceList = listCells ('ipv4net'))) { startPortlet ('Manage existing (' . count ($addrspaceList) . ')'); echo "\n"; - echo ""; + echo ""; foreach ($addrspaceList as $netinfo) { - echo "'updIPv4Prefix', 'id'=>$netinfo['id']))."'>"; + amplifyCell ($netinfo); echo "\n"; - echo "\n"; + echo '"; + echo ''; } echo "
 prefixname 
 prefixname
"; if (getConfigVar ('IPV4_JAYWALK') == 'yes') { @@ -2120,10 +2118,9 @@ function renderIPv4SpaceEditor () } else // only render clickable image for empty networks { - $netdata = spotEntity ('ipv4net', $netinfo['id']); - loadIPv4AddrList ($netdata); - if (count ($netdata['addrlist'])) - printImageHREF ('nodestroy', 'There are ' . count ($netdata['addrlist']) . ' allocations inside'); + loadIPv4AddrList ($netinfo); + if (count ($netinfo['addrlist'])) + printImageHREF ('nodestroy', 'There are ' . count ($netinfo['addrlist']) . ' allocations inside'); else { echo "'delIPv4Prefix', 'id'=>$netinfo['id']))."'>"; @@ -2132,11 +2129,9 @@ function renderIPv4SpaceEditor () } } - echo "${netinfo['ip']}/${netinfo['mask']}"; - echo ""; - printImageHREF ('save', 'Save changes', TRUE); - echo "
'; + echo "${netinfo['ip']}/${netinfo['mask']}' . htmlspecialchars ($netinfo['name']) . '
"; finishPortlet();