Skip to content

Commit

Permalink
If specified use the default settings for bw limitation rather than 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ermal committed May 23, 2012
1 parent 6405333 commit c5b0298
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etc/inc/captiveportal.inc
Expand Up @@ -1684,8 +1684,8 @@ function captiveportal_reapply_attributes($cpentry, $attributes) {
*/
$peruserbw = isset($config['captiveportal']['peruserbw']);

$bw_up = isset($attributes['bw_up']) ? round(intval($attributes['bw_up'])/1000, 2) : 0;
$bw_down = isset($attributes['bw_down']) ? round(intval($attributes['bw_down'])/1000, 2) : 0;
$bw_up = isset($attributes['bw_up']) ? round(intval($attributes['bw_up'])/1000, 2) : $config['captiveportal'][$cpzone]['bwdefaultup'];
$bw_down = isset($attributes['bw_down']) ? round(intval($attributes['bw_down'])/1000, 2) : $config['captiveportal'][$cpzone]['bwdefaultdn'];
$bw_up_pipeno = $cpentry[1]+20000;
$bw_down_pipeno = $cpentry[1]+20001;
$commands = "";
Expand Down

0 comments on commit c5b0298

Please sign in to comment.