r1750 + addAddressToObject(): last fixes
authorDenis Ovsienko <infrastation@yandex.ru>
Sat, 1 Mar 2008 14:27:16 +0000 (14:27 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Sat, 1 Mar 2008 14:27:16 +0000 (14:27 +0000)
inc/ophandlers.php

index de0e0a8a3641b108eace2a82b69770445ac24ccc..a4d37076e7b0503586d4745b21a805b2a3ec3df1 100644 (file)
@@ -504,11 +504,12 @@ function addAddressToObject ()
        assertStringArg ('type');
        // Strip masklen.
        $ip = ereg_replace ('/[[:digit:]]+$', '', $_REQUEST['ip']);
-       $error = bindIpToObject($ip, $_REQUEST['object_id'], $_REQUEST['name'], $_REQUEST['type']);
+       $object_id = $_REQUEST['object_id'];
+       $error = bindIpToObject($ip, $object_id, $_REQUEST['name'], $_REQUEST['type']);
        if ($error != '')
-               return "${root}?page=${pageno}&tab=${tabno}&object_id=$object_id&error=".urlencode($error);
+               return "${root}?page=${pageno}&tab=${tabno}&object_id=${object_id}&error=".urlencode($error);
        else
-               return "${root}?page=$pageno&tab=${tabno}&object_id=$object_id&message=".
+               return "${root}?page=$pageno&tab=${tabno}&object_id=${object_id}&message=".
                        urlencode("Address ${ip} was added successfully.");
 }