Project

General

Profile

« Previous | Next » 

Revision a4f07557

Added by Ermal LUÇI about 15 years ago

Ticket #642. Fix logic for the wizard code to unset and arraynum usage.

View differences:

usr/local/www/wizard.php
129 129
		$field_conv .= "['" . $f . "']";
130 130
	if($field_conv == "")
131 131
		return;
132
	if ($arraynum <> "")
133
		$field_conf .= "[" . $arraynum . "]";
132 134
	if(($field_type == "checkbox" and $updatetext <> "on") || $updatetext == "") {
133 135
		/*
134
		    item is a checkbox, it should have the value "on"
135
		    if it was checked
136
                */
136
		 * item is a checkbox, it should have the value "on"
137
		 * if it was checked
138
                 */
137 139
		$text = "unset(\$config" . $field_conv . ");";
138 140
		eval($text);
139 141
		return;
......
150 152
	if($unset <> "") {
151 153
		$text = "unset(\$config" . $field_conv . ");";
152 154
		eval($text);
153
		$text = "\$config" . $field_conv . "[" . $arraynum . "] = \"" . $updatetext . "\";";
154
		eval($text);
155
	} else {
156
		if($arraynum <> "") {
157
			$text = "\$config" . $field_conv . "[" . $arraynum . "] = \"" . $updatetext . "\";";
158
		} else {
159
			$text = "\$config" . $field_conv . " = \"" . $updatetext . "\";";
160
		}
161
		eval($text);
162 155
	}
156
	$text = "\$config" . $field_conv . " = \"" . $updatetext . "\";";
157
	eval($text);
163 158
}
164 159

  
165 160
// handle before form display event.

Also available in: Unified diff