mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 14:37:20 +00:00
check if notification exists before removing them
This commit is contained in:
parent
e9e8ed2844
commit
c9a18c2538
|
@ -397,14 +397,18 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
|
|
||||||
// If any of the notification subscribers no longer have read access,
|
// If any of the notification subscribers no longer have read access,
|
||||||
// remove their subscription.
|
// remove their subscription.
|
||||||
foreach ($this->_notifyList["users"] as $u) {
|
if(isset($this->_notifyList["users"])) {
|
||||||
if ($this->getAccessMode($u) < M_READ) {
|
foreach ($this->_notifyList["users"] as $u) {
|
||||||
$this->removeNotify($u->getID(), true);
|
if ($this->getAccessMode($u) < M_READ) {
|
||||||
|
$this->removeNotify($u->getID(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($this->_notifyList["groups"] as $g) {
|
if(isset($this->_notifyList["groups"])) {
|
||||||
if ($this->getGroupAccessMode($g) < M_READ) {
|
foreach ($this->_notifyList["groups"] as $g) {
|
||||||
$this->removeNotify($g->getID(), false);
|
if ($this->getGroupAccessMode($g) < M_READ) {
|
||||||
|
$this->removeNotify($g->getID(), false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user