Revision 1843
Added by Dietmar almost 12 years ago
save.php | ||
---|---|---|
208 | 208 |
'modules_upgrade_list' |
209 | 209 |
); |
210 | 210 |
|
211 |
$bRebuildAccessFiles = ( (isset( $_POST['rebuild_access_files']) && ( $_POST['rebuild_access_files'] == true )) ? true : false ) ; |
|
212 |
|
|
213 | 211 |
// Query current settings in the db, then loop through them and update the db with the new value |
214 | 212 |
$settings = array(); |
215 | 213 |
$old_settings = array(); |
... | ... | |
243 | 241 |
$value=(($value=='') ? 'section_' : $value); |
244 | 242 |
$passed = true; |
245 | 243 |
break; |
244 |
case 'media_directory': |
|
245 |
if(strpos($value,'/',0)===false) { $value= '/'.$value; } |
|
246 |
$passed = true; |
|
247 |
break; |
|
246 | 248 |
case 'pages_directory': |
247 |
$value = $admin->StripCodeFromText($value); |
|
248 |
$bNewPageFile = ( ( $value!= $old_settings['pages_directory'] ) ? true : false ); |
|
249 |
$passed = $bNewPageFile; |
|
250 |
$sGetId = '&id='.$bNewPageFile; |
|
251 |
// if(!is_dir(WB_PATH.$value) && is_writable(WB_PATH)) { |
|
252 |
// $passed = make_dir(WB_PATH.$value); |
|
253 |
// } |
|
254 |
$value = (($passed == true) ? $value : $old_settings['pages_directory']); |
|
255 |
$sPageDirectory = $value; |
|
249 |
if( ($database->get_one('SELECT COUNT(*) FROM `'.TABLE_PREFIX.'pages`'))==0 ) { |
|
250 |
$value = $admin->StripCodeFromText($value); |
|
251 |
$passed = true; |
|
252 |
} else { |
|
253 |
$value = $old_settings[$setting_name]; |
|
254 |
} |
|
255 |
if(strpos($value,'/',0)===false) { $value= '/'.$value; } |
|
256 | 256 |
break; |
257 | 257 |
case 'wbmailer_smtp_auth': |
258 |
// $value = isset($_POST[$setting_name]) ? $_POST[$setting_name] : '' ; |
|
259 | 258 |
$value = true ; |
260 | 259 |
$passed = true; |
261 | 260 |
break; |
... | ... | |
288 | 287 |
} |
289 | 288 |
} |
290 | 289 |
|
291 |
if(($bRebuildAccessFiles==true) && ($_POST['modules_upgrade_list']!='') && ($sPageDirectory==$old_settings['pages_directory']) ) { |
|
292 |
rebuild_all_accessfiles(); |
|
293 |
$aModuleList = ( explode(',', $_POST['modules_upgrade_list'])); |
|
294 |
upgrade_modules($aModuleList); |
|
295 |
} |
|
296 |
|
|
297 | 290 |
} |
298 | 291 |
/** |
299 | 292 |
* now save search settings |
Also available in: Unified diff
! trash only will be shown if more than one section exists
! In the server settings the renaming of the page_directory is only possible, if no page exists