r3279 renderIPv4Network(): save on a function call, where it makes sense
authorDenis Ovsienko <infrastation@yandex.ru>
Thu, 18 Feb 2010 14:59:20 +0000 (14:59 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 18 Feb 2010 14:59:20 +0000 (14:59 +0000)
inc/interface.php

index ebd5f44..03a9553 100644 (file)
@@ -2250,8 +2250,7 @@ function renderIPv4Network ($id)
        echo $wildcardbylen[$range['mask']];
        echo "</td></tr>\n";
 
-       $routers = findRouters ($range['addrlist']);
-       if (getConfigVar ('EXT_IPV4_VIEW') == 'yes' and count ($routers))
+       if (getConfigVar ('EXT_IPV4_VIEW') == 'yes' and count ($routers = findRouters ($range['addrlist'])))
        {
                echo "<tr><th width='50%' class=tdright>Routed by:</th>";
                printRoutersTD ($routers);