Project

General

Profile

« Previous | Next » 

Revision 1430

Added by Dietmar almost 14 years ago

fix save settings dir and file mode (Tks to the community)

View differences:

save.php
148 148
$sql .= 'ORDER BY `name`';
149 149

  
150 150
$res_settings = $database->query($sql);
151

  
151
$passed = false;
152 152
while($setting = $res_settings->fetchRow())
153 153
{
154 154
	$old_settings[$setting['name']] = $setting['value'];
......
158 158
	switch ($setting_name) {
159 159
		case 'default_timezone':
160 160
			$value=$value*60*60;
161
			$passed = true;
161 162
			break;
162 163
		case 'string_dir_mode':
163 164
			$value=$dir_mode;
165
			$passed = true;
164 166
			break;
165 167
		case 'string_file_mode':
166 168
			$value=$file_mode;
167
			break;
169
 			$passed = true;
170
		break;
168 171
		case 'pages_directory':
169 172
			break;
170 173
		default :
171

  
174
		    $passed = in_array($setting_name, $allow_empty_values);
172 175
			break;
173 176
	}
174 177
    if (!in_array($setting_name, $allow_tags_in_fields))
......
176 179
        $value = strip_tags($value);
177 180
    }
178 181

  
179
    $passed = in_array($setting_name, $allow_empty_values);
180 182

  
181 183
    if ( !in_array($value, $disallow_in_fields) && (isset($_POST[$setting_name]) || $passed == true) )
182 184
    {

Also available in: Unified diff