Revision 1eff6ee0
Added by Ermal Luçi over 10 years ago
etc/inc/captiveportal.inc | ||
---|---|---|
1783 | 1783 |
function captiveportal_reapply_attributes($cpentry, $attributes) { |
1784 | 1784 |
global $config, $cpzone, $g; |
1785 | 1785 |
|
1786 |
$dwfaultbw_up = isset($config['captiveportal'][$cpzone]['bwdefaultup']) ? $config['captiveportal'][$cpzone]['bwdefaultup'] : 0; |
|
1787 |
$dwfaultbw_down = isset($config['captiveportal'][$cpzone]['bwdefaultdn']) ? $config['captiveportal'][$cpzone]['bwdefaultdn'] : 0; |
|
1786 |
if (isset($config['captiveportal'][$cpzone]['peruserbw'])) { |
|
1787 |
$dwfaultbw_up = isset($config['captiveportal'][$cpzone]['bwdefaultup']) ? $config['captiveportal'][$cpzone]['bwdefaultup'] : 0; |
|
1788 |
$dwfaultbw_down = isset($config['captiveportal'][$cpzone]['bwdefaultdn']) ? $config['captiveportal'][$cpzone]['bwdefaultdn'] : 0; |
|
1789 |
} else |
|
1790 |
$dwfaultbw_up = $dwfaultbw_down = 0; |
|
1788 | 1791 |
$bw_up = isset($attributes['bw_up']) ? round(intval($attributes['bw_up'])/1000, 2) : $dwfaultbw_up; |
1789 | 1792 |
$bw_down = isset($attributes['bw_down']) ? round(intval($attributes['bw_down'])/1000, 2) : $dwfaultbw_down; |
1790 | 1793 |
$bw_up_pipeno = $cpentry[1]; |
... | ... | |
1961 | 1964 |
return; |
1962 | 1965 |
} |
1963 | 1966 |
|
1964 |
$dwfaultbw_up = isset($config['captiveportal'][$cpzone]['bwdefaultup']) ? $config['captiveportal'][$cpzone]['bwdefaultup'] : 0; |
|
1965 |
$dwfaultbw_down = isset($config['captiveportal'][$cpzone]['bwdefaultdn']) ? $config['captiveportal'][$cpzone]['bwdefaultdn'] : 0; |
|
1967 |
if (isset($config['captiveportal'][$cpzone]['peruserbw'])) { |
|
1968 |
$dwfaultbw_up = isset($config['captiveportal'][$cpzone]['bwdefaultup']) ? $config['captiveportal'][$cpzone]['bwdefaultup'] : 0; |
|
1969 |
$dwfaultbw_down = isset($config['captiveportal'][$cpzone]['bwdefaultdn']) ? $config['captiveportal'][$cpzone]['bwdefaultdn'] : 0; |
|
1970 |
} else |
|
1971 |
$dwfaultbw_up = $dwfaultbw_down = 0; |
|
1966 | 1972 |
$bw_up = isset($attributes['bw_up']) ? round(intval($attributes['bw_up'])/1000, 2) : $dwfaultbw_up; |
1967 | 1973 |
$bw_down = isset($attributes['bw_down']) ? round(intval($attributes['bw_down'])/1000, 2) : $dwfaultbw_down; |
1968 | 1974 |
|
Also available in: Unified diff
Do not apply bw limits if the setting is not enabled in CP. Though still respect radius attributes for now with this setting. Resolves #4127