Project

General

Profile

« Previous | Next » 

Revision 6be14e38

Added by Ermal LUÇI over 14 years ago

Unbreak adding subqueues to limiters. Correct some text in the way.

View differences:

etc/inc/shaper.inc
2770 2770
		$reqdfieldsn[] = "Bandwidth";
2771 2771
		$reqdfields[] = "bandwidthtype";
2772 2772
		$reqdfieldsn[] = "Bandwidthtype";
2773
		if (!empty($data['newname'])) {
2774
			$reqdfields[] = "newname";
2775
			$reqdfieldsn[] = "Name";
2776
		}
2773
		$reqdfields[] = "newname";
2774
		$reqdfieldsn[] = "Name";
2777 2775
	
2778 2776
		shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
2779 2777

  
......
2785 2783
            		$input_errors[] = "Buckets must be an integer between 16 and 65535.";
2786 2784
		if ($data['qlimit'] && (!is_numeric($data['qlimit']))) 
2787 2785
            		$input_errors[] = "Queue limit must be an integer";
2788
        	if (!preg_match("/^[a-zA-Z0-9_-]+$/", $data['name']))
2786
        	if (!empty($data['newname']) && !preg_match("/^[a-zA-Z0-9_-]+$/", $data['newname']))
2787
			$input_errors[] = "Queue names must be alphanumeric and _ or - only.";
2788
        	if (!empty($data['name']) && !preg_match("/^[a-zA-Z0-9_-]+$/", $data['name']))
2789 2789
			$input_errors[] = "Queue names must be alphanumeric and _ or - only.";
2790 2790
	}
2791 2791
}
......
3255 3255
                $form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\"";
3256 3256
                if ($this->GetEnabled() == "on")
3257 3257
                        $form .=  " CHECKED";
3258
                $form .= " ><span class=\"vexpl\"> Enable/Disable queue and its children</span>";
3258
                $form .= " ><span class=\"vexpl\"> Enable/Disable queue</span>";
3259 3259
                $form .= "</td></tr>";
3260 3260
		$form .= "<tr><td valign=\"center\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
3261 3261
		$form .= "<td class=\"vncellreq\">";
usr/local/www/firewall_shaper_vinterface.php
72 72
	if ($_POST['name'])
73 73
        	$qname = htmlspecialchars(trim($_POST['name']));
74 74
	else if ($_POST['newname'])
75
        	$qname = htmlspecialchars(trim($_POST['name']));
75
        	$qname = htmlspecialchars(trim($_POST['newname']));
76 76
        if ($_POST['pipe'])
77 77
        	$pipe = htmlspecialchars(trim($_POST['pipe']));
78 78
	else

Also available in: Unified diff