diff options
author | Vinicius Coque <vinicius.coque@bluepex.com> | 2011-03-25 08:59:29 -0300 |
---|---|---|
committer | Vinicius Coque <vinicius.coque@bluepex.com> | 2011-03-25 08:59:29 -0300 |
commit | 152ab4d0c036889d5d983cef0f612c2dcf211e7b (patch) | |
tree | 2120aa2834d2b0218a8bede4629aaac4acfbd5ec /etc/inc/shaper.inc | |
parent | 54bdff758f68e2e1b1ebd42b8b0b629b68ed1a3d (diff) | |
parent | d93ee937f2305f06148d972be92224a2a52ba9e5 (diff) | |
download | pfsense-152ab4d0c036889d5d983cef0f612c2dcf211e7b.zip pfsense-152ab4d0c036889d5d983cef0f612c2dcf211e7b.tar.gz |
Merge remote-tracking branch 'mainline/master' into inc
Conflicts:
etc/inc/interfaces.inc
etc/inc/priv.defs.inc
etc/inc/shaper.inc
etc/inc/system.inc
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r-- | etc/inc/shaper.inc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index c410495..a77669d 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -961,7 +961,9 @@ class priq_queue { $input_errors[] = gettext("Queue limit must be an integer"); if ($data['qlimit'] < 0) $input_errors[] = gettext("Queue limit must be positive"); - if (!preg_match("/^[a-zA-Z0-9_-]*$/", $data['name'])) + if (!empty($data['newname']) && !preg_match("/^[a-zA-Z0-9_-]*$/", $data['newname'])) + $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only."); + if (!empty($data['name']) && !preg_match("/^[a-zA-Z0-9_-]*$/", $data['name'])) $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only."); } @@ -2770,7 +2772,7 @@ class dummynet_class { $reqdfieldsn[] = gettext("Bandwidth"); $reqdfields[] = "bandwidthtype"; $reqdfieldsn[] = gettext("Bandwidthtype"); - $reqdfields[] = "name"; + $reqdfields[] = "newname"; $reqdfieldsn[] = gettext("Name"); shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors); @@ -2782,8 +2784,10 @@ class dummynet_class { ($data['buckets'] < 1 && $data['buckets'] > 100)) $input_errors[] = gettext("Buckets must be an integer between 16 and 65535."); if ($data['qlimit'] && (!is_numeric($data['qlimit']))) - $input_errors[] = gettext("Queue limit must be an integer"); - if (!preg_match("/^[a-zA-Z0-9_-]+$/", $data['name'])) + $input_errors[] = gettext("Queue limit must be an integer"); + if (!empty($data['newname']) && !preg_match("/^[a-zA-Z0-9_-]+$/", $data['newname'])) + $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only."); + if (!empty($data['name']) && !preg_match("/^[a-zA-Z0-9_-]+$/", $data['name'])) $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only."); } } @@ -3252,7 +3256,7 @@ class dnqueue_class extends dummynet_class { $form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\""; if ($this->GetEnabled() == "on") $form .= " CHECKED"; - $form .= " ><span class=\"vexpl\"> " . gettext("Enable/Disable queue and its children") . "</span>"; + $form .= " ><span class=\"vexpl\"> " . gettext("Enable/Disable queue") . "</span>"; $form .= "</td></tr>"; $form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">" . gettext("Name") . "</span></td>"; $form .= "<td class=\"vncellreq\">"; |