mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 04:56:06 +00:00
check if $recipients is set
This commit is contained in:
parent
b44a368d6d
commit
9a8b13a1cc
|
@ -124,17 +124,19 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common {
|
|||
}
|
||||
|
||||
$lc = $document->getLatestContent();
|
||||
if($recipients['i']) {
|
||||
foreach($recipients['i'] as $uid) {
|
||||
if($u = $dms->getUser($uid)) {
|
||||
$res = $lc->addIndRecipient($u, $user);
|
||||
if($recipients) {
|
||||
if($recipients['i']) {
|
||||
foreach($recipients['i'] as $uid) {
|
||||
if($u = $dms->getUser($uid)) {
|
||||
$res = $lc->addIndRecipient($u, $user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($recipients['g']) {
|
||||
foreach($recipients['g'] as $gid) {
|
||||
if($g = $dms->getGroup($gid)) {
|
||||
$res = $lc->addGrpRecipient($g, $user);
|
||||
if($recipients['g']) {
|
||||
foreach($recipients['g'] as $gid) {
|
||||
if($g = $dms->getGroup($gid)) {
|
||||
$res = $lc->addGrpRecipient($g, $user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user