Fix bugs burst

Fix Burst on php7
Fix edit hotspot plan
Fix burs reset if klick sync button on plan page
This commit is contained in:
gerandonk 2024-05-08 13:39:15 +07:00
parent 060718dfda
commit ee63abb618
3 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@ class Radius
{
$rates = explode('/', $rate);
##burst fixed
if (str_contains($rate, ' ')) {
if (strpos($rate, ' ')) {
$ratos = $rates[0].'/'.$rates[1].' '.$rates[2].'/'.$rates[3].'/'.$rates[4].'/'.$rates[5].'/'.$rates[6];
} else {
$ratos = $rates[0].'/'.$rates[1];

View file

@ -38,7 +38,7 @@ switch ($action) {
} else {
$radup = '000000';
}
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $b['burst'];
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $plan['burst'];
Radius::planUpSert($plan['id'], $radiusRate);
$log .= "DONE : Radius $plan[name_plan], $plan[shared_users], $radiusRate<br>";
} else {
@ -83,7 +83,7 @@ switch ($action) {
} else {
$radup = '000000';
}
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $b['burst'];
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $plan['burst'];
Radius::planUpSert($plan['id'], $radiusRate, $plan['pool']);
$log .= "DONE : RADIUS $plan[name_plan], $plan[pool], $rate<br>";
} else {

View file

@ -59,7 +59,7 @@
<div class="col-md-10">
<input type="radio" id="Unlimited" name="typebp" value="Unlimited"
{if $d['typebp'] eq 'Unlimited'} checked {/if}> {Lang::T('Unlimited')}
<input type="radio" id="Limited" {if $_c['radius_enable'] and $d['is_radius']}disabled{/if}
<input type="radio" id="Limited"
name="typebp" value="Limited" {if $d['typebp'] eq 'Limited'} checked {/if}>
{Lang::T('Limited')}
</div>