mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +00:00
passing an array of user to search() is supported
till now it was only possible to filter the search by a single user
This commit is contained in:
parent
158d651cc0
commit
45f0771b3f
|
@ -604,8 +604,16 @@ class SeedDMS_Core_DMS {
|
|||
// document owner.
|
||||
$searchOwner = "";
|
||||
if ($owner) {
|
||||
if(is_array($owner)) {
|
||||
$ownerids = array();
|
||||
foreach($owner as $o)
|
||||
$ownerids[] = $o->getID();
|
||||
if($ownerids)
|
||||
$searchOwner = "`tblFolders`.`owner` IN (".implode(',', $ownerids).")";
|
||||
} else {
|
||||
$searchOwner = "`tblFolders`.`owner` = '".$owner->getId()."'";
|
||||
}
|
||||
}
|
||||
|
||||
// Is the search restricted to documents created between two specific dates?
|
||||
$searchCreateDate = "";
|
||||
|
@ -726,8 +734,16 @@ class SeedDMS_Core_DMS {
|
|||
// document owner.
|
||||
$searchOwner = "";
|
||||
if ($owner) {
|
||||
if(is_array($owner)) {
|
||||
$ownerids = array();
|
||||
foreach($owner as $o)
|
||||
$ownerids[] = $o->getID();
|
||||
if($ownerids)
|
||||
$searchOwner = "`tblDocuments`.`owner` IN (".implode(',', $ownerids).")";
|
||||
} else {
|
||||
$searchOwner = "`tblDocuments`.`owner` = '".$owner->getId()."'";
|
||||
}
|
||||
}
|
||||
|
||||
// Check to see if the search has been restricted to a particular
|
||||
// document category.
|
||||
|
|
Loading…
Reference in New Issue
Block a user