r3727 trigger_object_8021qorder(): give up, when there are no domains/templates in...
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 2 Jun 2010 10:05:33 +0000 (10:05 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 2 Jun 2010 10:05:33 +0000 (10:05 +0000)
inc/triggers.php

index c9c3b5e..95ed4ae 100644 (file)
@@ -189,10 +189,11 @@ function trigger_object_8021qorder ()
 {
        if (NULL !== getVLANSwitchInfo ($_REQUEST['object_id']))
                return 'std';
-       elseif (considerConfiguredConstraint (spotEntity ('object', $_REQUEST['object_id']), 'VLANSWITCH_LISTSRC'))
-               return 'attn';
-       else
+       if (!count (getVLANDomainOptions()) or !count (getVSTOptions()))
                return '';
+       if (considerConfiguredConstraint (spotEntity ('object', $_REQUEST['object_id']), 'VLANSWITCH_LISTSRC'))
+               return 'attn';
+       return '';
 }
 
 // implement similar logic for IPv4 networks