mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +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();
|
$folder = $document->getFolder();
|
||||||
|
|
||||||
|
/* Get the notify list before removing the document */
|
||||||
|
$nl = $document->getNotifyList();
|
||||||
if (!$document->remove()) {
|
if (!$document->remove()) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("error_occured"));
|
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("error_occured"));
|
||||||
} else {
|
} else {
|
||||||
$document->getNotifyList();
|
|
||||||
if ($notifier){
|
if ($notifier){
|
||||||
$path = "";
|
$path = "";
|
||||||
$folderPath = $folder->getPath();
|
$folderPath = $folder->getPath();
|
||||||
|
@ -70,8 +71,8 @@ if (!$document->remove()) {
|
||||||
$message=mydmsDecodeString($message);
|
$message=mydmsDecodeString($message);
|
||||||
|
|
||||||
// Send notification to subscribers.
|
// Send notification to subscribers.
|
||||||
$notifier->toList($user, $document->_notifyList["users"], $subject, $message);
|
$notifier->toList($user, $nl["users"], $subject, $message);
|
||||||
foreach ($document->_notifyList["groups"] as $grp) {
|
foreach ($nl["groups"] as $grp) {
|
||||||
$notifier->toGroup($user, $grp, $subject, $message);
|
$notifier->toGroup($user, $grp, $subject, $message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user