r1428 + trigger_lvsconfig(): only count locally originated rules
authorDenis Ovsienko <infrastation@yandex.ru>
Mon, 24 Dec 2007 21:19:42 +0000 (21:19 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 24 Dec 2007 21:19:42 +0000 (21:19 +0000)
inc/triggers.php

index b3f3300ecf9390a0c4b7011ecf3b0ee7be109178..d1e0f1be96c2f4a09a9e5103daafce333c483457 100644 (file)
@@ -67,7 +67,8 @@ function trigger_lvsconfig ()
        $object = getObjectInfo ($object_id);
        if ($object['objtype_id'] != 4) // server
                return FALSE;
        $object = getObjectInfo ($object_id);
        if ($object['objtype_id'] != 4) // server
                return FALSE;
-       return (count (getObjectForwards ($object_id)) > 1);
+       $natrules = getObjectForwards ($object_id);
+       return (count ($natrules['out']) > 0);
 }
 
 ?>
 }
 
 ?>