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