issue splash message

This commit is contained in:
Uwe Steinmann 2021-05-21 08:51:47 +02:00
parent 9ed96e2a2a
commit 477d1a69b8

View File

@ -100,6 +100,7 @@ if ($action == "delnotify"){
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error"));
break; break;
case 0: case 0:
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_notify')));
// Email user / group, informing them of subscription change. // Email user / group, informing them of subscription change.
if($notifier) { if($notifier) {
$notifier->sendDeleteFolderNotifyMail($folder, $user, $obj); $notifier->sendDeleteFolderNotifyMail($folder, $user, $obj);
@ -111,6 +112,7 @@ if ($action == "delnotify"){
// add notification // add notification
else if ($action == "addnotify") { else if ($action == "addnotify") {
/* Both $userid and $groupid can be set */
if ($userid > 0) { if ($userid > 0) {
$res = $document->addNotify($userid, true); $res = $document->addNotify($userid, true);
switch ($res) { switch ($res) {
@ -127,12 +129,11 @@ else if ($action == "addnotify") {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error"));
break; break;
case 0: case 0:
// Email user / group, informing them of subscription. $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_add_notify')));
if ($notifier){ if ($notifier){
$obj = $dms->getUser($userid); $obj = $dms->getUser($userid);
$notifier->sendNewDocumentNotifyMail($document, $user, $obj); $notifier->sendNewDocumentNotifyMail($document, $user, $obj);
} }
break; break;
} }
} }
@ -152,6 +153,7 @@ else if ($action == "addnotify") {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error"));
break; break;
case 0: case 0:
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_add_notify')));
if ($notifier){ if ($notifier){
$obj = $dms->getGroup($groupid); $obj = $dms->getGroup($groupid);
$notifier->sendNewDocumentNotifyMail($document, $user, $obj); $notifier->sendNewDocumentNotifyMail($document, $user, $obj);