From c46ee61fbce7146030318d21f3a6247edf8223ec Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 22 Mar 2011 19:10:21 +0000 Subject: Unbreak adding subqueues to queues also. This has happened after allowing renaming, oops. --- etc/inc/shaper.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'etc/inc/shaper.inc') 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."; } -- cgit v1.1