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,7 +604,15 @@ class SeedDMS_Core_DMS {
|
||||||
// document owner.
|
// document owner.
|
||||||
$searchOwner = "";
|
$searchOwner = "";
|
||||||
if ($owner) {
|
if ($owner) {
|
||||||
$searchOwner = "`tblFolders`.`owner` = '".$owner->getId()."'";
|
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?
|
// Is the search restricted to documents created between two specific dates?
|
||||||
|
@ -726,7 +734,15 @@ class SeedDMS_Core_DMS {
|
||||||
// document owner.
|
// document owner.
|
||||||
$searchOwner = "";
|
$searchOwner = "";
|
||||||
if ($owner) {
|
if ($owner) {
|
||||||
$searchOwner = "`tblDocuments`.`owner` = '".$owner->getId()."'";
|
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
|
// Check to see if the search has been restricted to a particular
|
||||||
|
|
Loading…
Reference in New Issue
Block a user