mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
- get list of users/groups to notify before removing document
This commit is contained in:
parent
af5e6e7b79
commit
0d695f57d6
|
@ -45,10 +45,11 @@ if ($document->getAccessMode($user) < M_ALL) {
|
|||
|
||||
$folder = $document->getFolder();
|
||||
|
||||
/* Get the notify list before removing the document */
|
||||
$nl = $document->getNotifyList();
|
||||
if (!$document->remove()) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("error_occured"));
|
||||
} else {
|
||||
$document->getNotifyList();
|
||||
if ($notifier){
|
||||
$path = "";
|
||||
$folderPath = $folder->getPath();
|
||||
|
@ -70,8 +71,8 @@ if (!$document->remove()) {
|
|||
$message=mydmsDecodeString($message);
|
||||
|
||||
// Send notification to subscribers.
|
||||
$notifier->toList($user, $document->_notifyList["users"], $subject, $message);
|
||||
foreach ($document->_notifyList["groups"] as $grp) {
|
||||
$notifier->toList($user, $nl["users"], $subject, $message);
|
||||
foreach ($nl["groups"] as $grp) {
|
||||
$notifier->toGroup($user, $grp, $subject, $message);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user