r1541 + fix broken delLB op for RS pool
authorDenis Ovsienko <infrastation@yandex.ru>
Tue, 15 Jan 2008 18:17:01 +0000 (18:17 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Tue, 15 Jan 2008 18:17:01 +0000 (18:17 +0000)
inc/database.php
inc/interface.php
inc/ophandlers.php

index 3dfd601d00a096085df8986001c9244592ba4da4..1a5dffd449f21af46985696111ed84d5f7e7636f 100644 (file)
@@ -2217,7 +2217,7 @@ function commitDeleteVS ($id = 0)
 function commitDeleteLB ($object_id = 0, $pool_id = 0, $vs_id = 0)
 {
        global $dbxlink;
-       if ($object_id <= 0 or $pool_id <= 0 or $vs_id = 0)
+       if ($object_id <= 0 or $pool_id <= 0 or $vs_id <= 0)
                return FALSE;
        $query = "delete from IPLoadBalancer where object_id = ${object_id} and " .
                "rspool_id = ${pool_id} and vs_id = ${vs_id} limit 1";
index 63f02fd8eb7417e6acde10f6ca240a6e0dd20b62..5687a32c6e0be60e0670bd1cff90c0aadd4628ec 100644 (file)
@@ -3822,7 +3822,7 @@ function renderRSPoolLBForm ($pool_id = 0)
                        echo "<input type=hidden name=pool_id value='${pool_id}'>";
                        echo "<input type=hidden name=vs_id value='${vs_id}'>";
                        echo "<input type=hidden name=object_id value='${object_id}'>";
-                       echo "<tr valign=top><td><a href='${root}process.php?page=${pageno}&tab=${tabno}&op=delLB&pool_id=${pool_id}&object_id=${object_id}'>";
+                       echo "<tr valign=top><td><a href='${root}process.php?page=${pageno}&tab=${tabno}&op=delLB&pool_id=${pool_id}&object_id=${object_id}&vs_id=${vs_id}'>";
                        printImageHREF ('delete', 'Unconfigure');
                        echo "</a></td>";
                        echo "<td class=tdleft><a href='${root}?page=object&object_id=${object_id}'>${oi['dname']}</a></td>";
index 18dca9718dc89075b69a953acd99b16cc7460be9..0a2332473f599f47bdeefc9fa557f19a8753a12d 100644 (file)
@@ -1013,8 +1013,9 @@ function deleteLoadBalancer ()
 
        assertUIntArg ('object_id');
        assertUIntArg ('pool_id');
+       assertUIntArg ('vs_id');
        $pool_id = $_REQUEST['pool_id'];
-       if (!commitDeleteLB ($_REQUEST['object_id'], $pool_id))
+       if (!commitDeleteLB ($_REQUEST['object_id'], $pool_id, $_REQUEST['vs_id']))
                return "${root}?page=${pageno}&tab=${tabno}&id=${pool_id}&error=" . urlencode ('commitDeleteLB() failed');
        else
                return "${root}?page=${pageno}&tab=${tabno}&id=${pool_id}&message=" . urlencode ("Load balancer was successfully deleted");