r2470 - removed unused buildRSPoolName()
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 20 Feb 2009 17:01:32 +0000 (17:01 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 20 Feb 2009 17:01:32 +0000 (17:01 +0000)
 - adjusted renderRSPoolCell() and used it in renderSearchResults()

inc/functions.php
inc/interface.php

index cec456ccd0490ccc9164d49226b9a57a2eba15d1..bb2c6c6c2d237dc1f0220335dbdb87a4e2013369 100644 (file)
@@ -641,16 +641,6 @@ function buildVServiceName ($vsinfo = NULL)
        return $vsinfo['vip'] . ':' . $vsinfo['vport'] . '/' . $vsinfo['proto'];
 }
 
-function buildRSPoolName ($rspool = NULL)
-{
-       if ($rspool == NULL)
-       {
-               showError ('NULL argument', __FUNCTION__);
-               return NULL;
-       }
-       return strlen ($rspool['name']) ? $rspool['name'] : 'ANONYMOUS pool';
-}
-
 // rackspace usage for a single rack
 // (T + W + U) / (height * 3 - A)
 function getRSUforRack ($data = NULL)
index cb8183a70f019062faa0831d1ed2b6480b2459ca..c0e3c86b6a368ff008fda061fd5720261e22868d 100644 (file)
@@ -3209,9 +3209,9 @@ function renderSearchResults ()
                                        echo '<table border=0 cellpadding=5 cellspacing=0 align=center class=cooltable>';
                                        foreach ($what as $rspool)
                                        {
-                                               echo "<tr class=row_${order}><td class=tdleft><a href='${root}?page=ipv4rspool&pool_id=${rspool['pool_id']}'>";
-                                               echo buildRSPoolName ($rspool);
-                                               echo "</a></td></tr>";
+                                               echo "<tr class=row_${order}><td class=tdleft>";
+                                               renderRSPoolCell ($rspool['pool_id'], $rspool['name']);
+                                               echo "</td></tr>";
                                                $order = $nextorder[$order];
                                        }
                                        echo '</table>';
@@ -5946,7 +5946,7 @@ function renderRSPoolCell ($pool_id, $pool_name)
        global $root;
        echo "<table class=slbcell><tr><td>";
        echo "<a href='${root}?page=ipv4rspool&pool_id=${pool_id}'>";
-       echo empty ($pool_name) ? "ANONYMOUS pool [${pool_id}]" : $pool_name;
+       echo empty ($pool_name) ? "ANONYMOUS pool [${pool_id}]" : niftyString ($pool_name);
        echo "</a></td></tr><tr><td>";
        printImageHREF ('RS pool');
        echo "</td></tr><tr><td><small>";