r4222 produceUplinkPorts(): fix recent commit to return unique values again
authorDenis Ovsienko <infrastation@yandex.ru>
Mon, 14 Feb 2011 10:18:17 +0000 (10:18 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 14 Feb 2011 10:18:17 +0000 (10:18 +0000)
wwwroot/inc/functions.php

index af266c992c28478b6d9dc25ae51399979f6a95dc..072afcb411a8a4f36c256dac221fafd8a98e5c7e 100644 (file)
@@ -3349,7 +3349,7 @@ function produceUplinkPorts ($domain_vlanlist, $portlist, $object_id)
        }
 
        foreach ($domain_vlanlist as $vlan_id => $vlan)
-               if ($vlan['vlan_type'] == 'compulsory')
+               if ($vlan['vlan_type'] == 'compulsory' and ! in_array ($vlan_id, $employed))
                        $employed[] = $vlan_id;
        foreach ($portlist as $port_name => $port)
                if ($port['vst_role'] != 'uplink')