Project

General

Profile

« Previous | Next » 

Revision ba9e9bbf

Added by Ermal Luçi over 15 years ago

Correctly set variable values during each iteration. Ticket #414. Spotted-by: irc(Efonne)

View differences:

usr/local/www/wizard.php
88 88

  
89 89
if ($_POST) {
90 90
    foreach ($pkg['step'][$stepid]['fields']['field'] as $field) {
91
        if($field['bindstofield'] <> "" and $field['type'] <> "submit") {
91
        if(!empty($field['bindstofield']) and $field['type'] <> "submit") {
92 92
		$fieldname = $field['name'];
93
		$unset_fields = "";
94 93
		$fieldname = ereg_replace(" ", "", $fieldname);
95 94
		$fieldname = strtolower($fieldname);
96 95
		// update field with posted values.
97
                if($field['unsetfield'] <> "") $unset_fields = "yes";
98
		if($field['arraynum'] <> "") $arraynum = $field['arraynum'];
99
		if($field['bindstofield'])
96
                if($field['unsetfield'] <> "")
97
			$unset_fields = "yes";
98
		else
99
			$unset_fields = "";
100
		if($field['arraynum'] <> "")
101
			$arraynum = $field['arraynum'];
102
		else
103
			$arraynum = "";
104
		if(!empty($field['bindstofield']))
100 105
			update_config_field( $field['bindstofield'], $_POST[$fieldname], $unset_fields, $arraynum, $field['type']);
101 106
        }
102 107

  

Also available in: Unified diff