check if SeedDMS_Core_DMS::inList() returns boolean false

inList() used to return true of false. It returns the index in the
array insteaf of true
This commit is contained in:
Uwe Steinmann 2015-06-29 10:28:52 +02:00
parent f7d695c015
commit 88739db6e7

View File

@ -111,7 +111,7 @@ if (($oldname = $document->getName()) != $name) {
// if user is not owner send notification to owner
if ($user->getID() != $document->getOwner()->getID() &&
!SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) {
false === SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) {
$notifyList['users'][] = $document->getOwner();
}
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
@ -165,7 +165,7 @@ if (($oldcomment = $document->getComment()) != $comment) {
// if user is not owner send notification to owner
if ($user->getID() != $document->getOwner()->getID() &&
!SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) {
false === SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) {
$notifyList['users'][] = $document->getOwner();
}
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
@ -207,7 +207,7 @@ if ($expires != $document->getExpires()) {
// if user is not owner send notification to owner
if ($user->getID() != $document->getOwner()->getID() &&
!SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) {
false === SeedDMS_Core_DMS::inList($document->getOwner(), $notifyList['users'])) {
$notifyList['users'][] = $document->getOwner();
}
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);