Revision 109
Added by stefan about 19 years ago
save.php | ||
---|---|---|
124 | 124 |
while($setting = $results->fetchRow()) { |
125 | 125 |
$setting_name = $setting['name']; |
126 | 126 |
$value = $admin->get_post($setting_name); |
127 |
$value = $admin->add_slashes($value); |
|
128 |
switch ($setting_name) { |
|
129 |
case 'default_timezone': |
|
130 |
$value=$value*60*60; |
|
131 |
break; |
|
132 |
case 'string_dir_mode': |
|
133 |
$value=$dir_mode; |
|
134 |
break; |
|
135 |
case 'string_file_mode': |
|
136 |
$value=$file_mode; |
|
137 |
break; |
|
127 |
if ($value!=null) { |
|
128 |
$value = $admin->add_slashes($value); |
|
129 |
switch ($setting_name) { |
|
130 |
case 'default_timezone': |
|
131 |
$value=$value*60*60; |
|
132 |
break; |
|
133 |
case 'string_dir_mode': |
|
134 |
$value=$dir_mode; |
|
135 |
break; |
|
136 |
case 'string_file_mode': |
|
137 |
$value=$file_mode; |
|
138 |
break; |
|
139 |
} |
|
140 |
//echo $setting_name.':'.$value."<br />"; |
|
141 |
$database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$setting_name'"); |
|
138 | 142 |
} |
139 |
//echo $setting_name.':'.$value."<br />"; |
|
140 |
$database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$setting_name'"); |
|
141 | 143 |
} |
142 | 144 |
|
143 | 145 |
// Query current search settings in the db, then loop through them and update the db with the new value |
Also available in: Unified diff
Added new setting 'wb_version' which is not changeable in admin>>settings but allows for easier upgrade scripts in the future.