diff options
author | Ermal <eri@pfsense.org> | 2011-03-22 19:10:21 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-03-22 19:10:21 +0000 |
commit | c46ee61fbce7146030318d21f3a6247edf8223ec (patch) | |
tree | 5cf212d9d0b64fe243b8766d22a004501f2bcbf4 /etc/inc/shaper.inc | |
parent | 6be14e38fdebf095e91845a92dae5374b90ef502 (diff) | |
download | pfsense-c46ee61fbce7146030318d21f3a6247edf8223ec.zip pfsense-c46ee61fbce7146030318d21f3a6247edf8223ec.tar.gz |
Unbreak adding subqueues to queues also. This has happened after allowing renaming, oops.
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r-- | etc/inc/shaper.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index 493e278..9c8618a 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -961,7 +961,9 @@ class priq_queue { $input_errors[] = "Queue limit must be an integer"; if ($data['qlimit'] < 0) $input_errors[] = "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[] = "Queue names must be alphanumeric and _ or - only."; + if (!empty($data['name']) && !preg_match("/^[a-zA-Z0-9_-]*$/", $data['name'])) $input_errors[] = "Queue names must be alphanumeric and _ or - only."; } |