From c5b0298f87486120aea4be8a488819e3eb724731 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 23 May 2012 12:57:43 +0000 Subject: [PATCH] If specified use the default settings for bw limitation rather than 0 --- etc/inc/captiveportal.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index a9c981c24ac..9045d9a2b08 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -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 = "";