mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
expired documents can be skipped from counting in countTasks()
This commit is contained in:
parent
3ac58509cc
commit
9186cf66c3
|
@ -927,7 +927,7 @@ class SeedDMS_Core_DMS {
|
|||
* @param object $user user
|
||||
* @return array list of documents records
|
||||
*/
|
||||
function countTasks($listtype, $user=null) { /* {{{ */
|
||||
function countTasks($listtype, $user=null, $param5=true) { /* {{{ */
|
||||
if (!$this->db->createTemporaryTable("ttstatid") || !$this->db->createTemporaryTable("ttcontentid")) {
|
||||
return false;
|
||||
}
|
||||
|
@ -958,7 +958,10 @@ class SeedDMS_Core_DMS {
|
|||
$queryStr .= "OR `tblDocumentReviewers`.`type` = 1 AND `tblDocumentReviewers`.`required` IN (".implode(',', $groups).") ";
|
||||
$queryStr .= ") ";
|
||||
$queryStr .= "AND `tblDocumentReviewLog`.`status` = 0 ";
|
||||
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_EXPIRED.") ";
|
||||
$docstatarr = array(S_DRAFT_REV);
|
||||
if($param5)
|
||||
$docstatarr[] = S_EXPIRED;
|
||||
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".implode(',', $docstatarr).") ";
|
||||
break; /* }}} */
|
||||
case 'ApproveByMe': // Documents I have to approve {{{
|
||||
if (!$this->db->createTemporaryTable("ttapproveid")) {
|
||||
|
@ -976,7 +979,10 @@ class SeedDMS_Core_DMS {
|
|||
$queryStr .= ") ";
|
||||
}
|
||||
$queryStr .= "AND `tblDocumentApproveLog`.`status` = 0 ";
|
||||
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_APP.", ".S_EXPIRED.") ";
|
||||
$docstatarr = array(S_DRAFT_APP);
|
||||
if($param5)
|
||||
$docstatarr[] = S_EXPIRED;
|
||||
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".implode(',', $docstatarr).") ";
|
||||
break; /* }}} */
|
||||
case 'ReceiptByMe': // Documents I have to receipt {{{
|
||||
if (!$this->db->createTemporaryTable("ttreceiptid")) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user