output splash messages when adding, editing, removing an entry

This commit is contained in:
Uwe Steinmann 2022-02-22 09:10:04 +01:00
parent a8ba048ea9
commit d4df6796f3
2 changed files with 27 additions and 0 deletions

View File

@ -54,6 +54,9 @@ if ($action == "addcategory") {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
$categoryid=$newCategory->getID();
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_add_category')));
add_log_line(".php&action=addcategory&categoryid=".$categoryid);
}
//Kategorie löschen ----------------------------------------------------------------------------------
@ -76,6 +79,9 @@ else if ($action == "removecategory") {
if (!$category->remove()) {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_category')));
add_log_line(".php&action=removecategory&categoryid=".$categoryid);
$categoryid=-1;
}
@ -100,6 +106,9 @@ else if ($action == "editcategory") {
if (!$category->setName($name)) {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_edit_category')));
add_log_line(".php&action=editcategory&categoryid=".$categoryid);
}
else {

View File

@ -54,6 +54,9 @@ if ($action == "addcategory") {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
$categoryid=$newCategory->getID();
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_add_keyword_category')));
add_log_line(".php&action=addcategory&categoryid=".$categoryid);
}
// Delete keyword categorie ---------------------------------------------
@ -80,6 +83,9 @@ else if ($action == "removecategory") {
if (!$category->remove()) {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_keyword_category')));
add_log_line(".php&action=removecategory&categoryid=".$categoryid);
$categoryid=-1;
}
@ -109,6 +115,9 @@ else if ($action == "editcategory") {
if (!$category->setName($name)) {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_edit_keyword_category')));
add_log_line(".php&action=editcategory&categoryid=".$categoryid);
}
// Modify keyword categorie: new list of keywords -----------------------
@ -132,6 +141,9 @@ else if ($action == "newkeywords") {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_add_keyword')));
add_log_line(".php&action=newkeywords&categoryid=".$categoryid);
}
// Modify keyword categorie: modify list of keywords -------------------
@ -166,6 +178,9 @@ else if ($action == "editkeywords")
if (!$category->editKeywordList($keywordsid, $keywords)) {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_edit_keyword')));
add_log_line(".php&action=editkeywords&categoryid=".$categoryid);
}
// Modify keyword categorie: delete list of keywords --------------------
@ -198,6 +213,9 @@ else if ($action == "removekeywords") {
if (!$category->removeKeywordList($keywordsid)) {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_keyword')));
add_log_line(".php&action=removekeywords&categoryid=".$categoryid);
}
else {
UI::exitError(getMLText("admin_tools"),getMLText("unknown_command"));