mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-20 08:31:26 +00:00
add list of documents checked out by me in getDocumentList()
This commit is contained in:
parent
c0ba8a6711
commit
4b6eeba319
|
@ -709,6 +709,26 @@ class SeedDMS_Core_DMS {
|
||||||
else if ($orderby=='s') $queryStr .= "ORDER BY `status`";
|
else if ($orderby=='s') $queryStr .= "ORDER BY `status`";
|
||||||
else $queryStr .= "ORDER BY `name`";
|
else $queryStr .= "ORDER BY `name`";
|
||||||
break;
|
break;
|
||||||
|
case 'CheckedOutByMe': // Documents I have checked out
|
||||||
|
$user = $param1;
|
||||||
|
|
||||||
|
$qs = 'SELECT document FROM tblDocumentCheckOuts WHERE userID='.$user->getID();
|
||||||
|
$ra = $this->db->getResultArray($qs);
|
||||||
|
if (is_bool($ra) && !$ra) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$docs = array();
|
||||||
|
foreach($ra as $d) {
|
||||||
|
$docs[] = $d['document'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($docs) {
|
||||||
|
$queryStr .= "AND `tblDocuments`.`id` IN (" . implode(',', $docs) . ") ".
|
||||||
|
"ORDER BY `statusDate` DESC";
|
||||||
|
} else {
|
||||||
|
$queryStr = '';
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($queryStr) {
|
if($queryStr) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user