diff --git a/system/devices/MikrotikHotspot.php b/system/devices/MikrotikHotspot.php index c82d74df..389a20c9 100644 --- a/system/devices/MikrotikHotspot.php +++ b/system/devices/MikrotikHotspot.php @@ -122,6 +122,9 @@ class MikrotikHotspot if (!empty(trim($bw['burst']))) { $rate .= ' ' . $bw['burst']; } + if ($bw['rate_up'] == '0' || $bw['rate_down'] == '0') { + $rate = ''; + } $addRequest = new RouterOS\Request('/ip/hotspot/user/profile/add'); $client->sendSync( $addRequest @@ -202,6 +205,9 @@ class MikrotikHotspot if (!empty(trim($bw['burst']))) { $rate .= ' ' . $bw['burst']; } + if ($bw['rate_up'] == '0' || $bw['rate_down'] == '0') { + $rate = ''; + } $setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set'); $client->sendSync( $setRequest diff --git a/system/devices/MikrotikPppoe.php b/system/devices/MikrotikPppoe.php index 7b3fdac6..b3e5c9ec 100644 --- a/system/devices/MikrotikPppoe.php +++ b/system/devices/MikrotikPppoe.php @@ -149,6 +149,9 @@ class MikrotikPppoe if(!empty(trim($bw['burst']))){ $rate .= ' '.$bw['burst']; } + if ($bw['rate_up'] == '0' || $bw['rate_down'] == '0') { + $rate = ''; + } $pool = ORM::for_table("tbl_pool")->where("pool_name", $plan['pool'])->find_one(); $addRequest = new RouterOS\Request('/ppp/profile/add'); $client->sendSync( @@ -205,6 +208,9 @@ class MikrotikPppoe if(!empty(trim($bw['burst']))){ $rate .= ' '.$bw['burst']; } + if ($bw['rate_up'] == '0' || $bw['rate_down'] == '0') { + $rate = ''; + } $pool = ORM::for_table("tbl_pool")->where("pool_name", $new_plan['pool'])->find_one(); $setRequest = new RouterOS\Request('/ppp/profile/set'); $client->sendSync(