Project

General

Profile

« Previous | Next » 

Revision 30ef6f8d

Added by Ermal LUÇI over 14 years ago

Allow renaming even shaper queues as an improvement.

View differences:

etc/inc/shaper.inc
967 967
	}
968 968

  
969 969
	function ReadConfig(&$q) {
970
		if (isset($q['name']))
971
				$this->SetQname($q['name']);
970
		if (!empty($q['name']) && !empty($q['newname']) && $q['name'] != $q['newname']) {
971
			$this->SetQname($q['newname']);
972
		} else if (!empty($q['newname'])) {
973
			$this->SetQname($q['newname']);
974
		} else if (isset($q['name']))
975
			$this->SetQname($q['name']);
972 976
		if (isset($q['interface']))
973 977
				$this->SetInterface($q['interface']);
974 978
		$this->SetBandwidth($q['bandwidth']);
......
1100 1104
		$form .= "<tr>";
1101 1105
		$form .= "<td width=\"22%\" valign=\"center\" class=\"vncellreq\">";
1102 1106
		$form .= "Queue Name</td><td width=\"78%\" class=\"vtable\">";
1103
		$form .= "<input name=\"name\" type=\"text\" id=\"name\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\"";
1107
		$form .= "<input name=\"newname\" type=\"text\" id=\"newname\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\"";
1108
		$form .= htmlspecialchars($this->GetQname());
1109
		$form .= "\">";
1110
		$form .= "<input name=\"name\" type=\"hidden\" id=\"name\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\"";
1104 1111
		$form .= htmlspecialchars($this->GetQname());
1105 1112
		$form .= "\">";
1106 1113
		$form .= "<br /> <span class=\"vexpl\">Enter the name of the queue here.  Do not use spaces and limit the size to 15 characters.";

Also available in: Unified diff