mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
addGrpRecepient() and addIndRecepient() return the log id not 0
This commit is contained in:
parent
ee568bb916
commit
8b4c01e339
|
@ -122,9 +122,21 @@ foreach ($pIndRev as $p) {
|
||||||
$res = $content->addIndRecipient($accessIndex["i"][$p], $user);
|
$res = $content->addIndRecipient($accessIndex["i"][$p], $user);
|
||||||
$unm = $accessIndex["i"][$p]->getFullName();
|
$unm = $accessIndex["i"][$p]->getFullName();
|
||||||
$uml = $accessIndex["i"][$p]->getEmail();
|
$uml = $accessIndex["i"][$p]->getEmail();
|
||||||
|
|
||||||
switch ($res) {
|
switch ($res) {
|
||||||
case 0:
|
case -1:
|
||||||
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error"));
|
||||||
|
break;
|
||||||
|
case -2:
|
||||||
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||||
|
break;
|
||||||
|
case -3:
|
||||||
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_assigned"));
|
||||||
|
break;
|
||||||
|
case -4:
|
||||||
|
// email error
|
||||||
|
break;
|
||||||
|
default:
|
||||||
// Send an email notification to the new recipient.
|
// Send an email notification to the new recipient.
|
||||||
if($settings->_enableNotificationAppRev) {
|
if($settings->_enableNotificationAppRev) {
|
||||||
if ($notifier) {
|
if ($notifier) {
|
||||||
|
@ -145,18 +157,6 @@ foreach ($pIndRev as $p) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case -1:
|
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error"));
|
|
||||||
break;
|
|
||||||
case -2:
|
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
|
||||||
break;
|
|
||||||
case -3:
|
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_assigned"));
|
|
||||||
break;
|
|
||||||
case -4:
|
|
||||||
// email error
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -231,7 +231,19 @@ foreach ($pGrpRev as $p) {
|
||||||
$res = $content->addGrpRecipient($accessIndex["g"][$p], $user);
|
$res = $content->addGrpRecipient($accessIndex["g"][$p], $user);
|
||||||
$gnm = $accessIndex["g"][$p]->getName();
|
$gnm = $accessIndex["g"][$p]->getName();
|
||||||
switch ($res) {
|
switch ($res) {
|
||||||
case 0:
|
case -1:
|
||||||
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error"));
|
||||||
|
break;
|
||||||
|
case -2:
|
||||||
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||||
|
break;
|
||||||
|
case -3:
|
||||||
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_assigned"));
|
||||||
|
break;
|
||||||
|
case -4:
|
||||||
|
// email error
|
||||||
|
break;
|
||||||
|
default:
|
||||||
// Send an email notification to the new recipient.
|
// Send an email notification to the new recipient.
|
||||||
if($settings->_enableNotificationAppRev) {
|
if($settings->_enableNotificationAppRev) {
|
||||||
if ($notifier) {
|
if ($notifier) {
|
||||||
|
@ -252,18 +264,6 @@ foreach ($pGrpRev as $p) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case -1:
|
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error"));
|
|
||||||
break;
|
|
||||||
case -2:
|
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
|
||||||
break;
|
|
||||||
case -3:
|
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_assigned"));
|
|
||||||
break;
|
|
||||||
case -4:
|
|
||||||
// email error
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user