mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
support saving via ajax
This commit is contained in:
parent
f8ceb0d56a
commit
c2d8b383c3
|
@ -321,15 +321,21 @@ if ($action == "saveSettings")
|
|||
// -------------------------------------------------------------------------
|
||||
// save
|
||||
// -------------------------------------------------------------------------
|
||||
if (!$settings->save())
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("settings_SaveError"));
|
||||
if (!$settings->save()) {
|
||||
if(isAjax()) {
|
||||
echo json_encode(array('success'=>false, 'msg'=>getMLText('settings_SaveError')));
|
||||
exit;
|
||||
} else {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("settings_SaveError"));
|
||||
}
|
||||
}
|
||||
|
||||
add_log_line(".php&action=savesettings");
|
||||
}
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_settings_saved')));
|
||||
|
||||
|
||||
header("Location:../out/out.Settings.php?currenttab=".$_POST['currenttab']);
|
||||
|
||||
?>
|
||||
if(isAjax()) {
|
||||
echo json_encode(array('success'=>true, 'msg'=>getMLText('splash_settings_saved')));
|
||||
} else {
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_settings_saved')));
|
||||
header("Location:../out/out.Settings.php?currenttab=".$_POST['currenttab']);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user