mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
send notifications when adding and deleting access
This commit is contained in:
parent
a7d4b786a2
commit
3c92ebd942
|
@ -182,13 +182,20 @@ else if ($action == "setdefault") {
|
|||
|
||||
// Modify permission ------------------------------------------------------
|
||||
else if ($action == "editaccess") {
|
||||
$oldmode = $mode;
|
||||
if (isset($userid)) {
|
||||
$folder->changeAccess($mode, $userid, true);
|
||||
$oldmode = $folder->changeAccess($mode, $userid, true);
|
||||
}
|
||||
else if (isset($groupid)) {
|
||||
$folder->changeAccess($mode, $groupid, false);
|
||||
$oldmode = $folder->changeAccess($mode, $groupid, false);
|
||||
}
|
||||
if($oldmode != $mode) {
|
||||
if($notifier) {
|
||||
// Send notification to subscribers.
|
||||
$notifier->sendChangedFolderAccessMail($folder, $user);
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_edit_access')));
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_edit_access')));
|
||||
}
|
||||
|
||||
// Delete Permission ------------------------------------------------------
|
||||
|
@ -200,6 +207,10 @@ else if ($action == "delaccess") {
|
|||
else if (isset($groupid)) {
|
||||
$folder->removeAccess($groupid, false);
|
||||
}
|
||||
if($notifier) {
|
||||
// Send notification to subscribers.
|
||||
$notifier->sendChangedFolderAccessMail($folder, $user);
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_delete_access')));
|
||||
}
|
||||
|
||||
|
@ -212,6 +223,10 @@ else if ($action == "addaccess") {
|
|||
if (isset($groupid) && $groupid != -1) {
|
||||
$folder->addAccess($mode, $groupid, false);
|
||||
}
|
||||
if($notifier) {
|
||||
// Send notification to subscribers.
|
||||
$notifier->sendChangedFolderAccessMail($folder, $user);
|
||||
}
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_add_access')));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user