mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
3ac58509cc
|
@ -1087,14 +1087,20 @@ class SeedDMS_Core_DMS {
|
|||
* @param string $listtype type of document list, can be 'AppRevByMe',
|
||||
* 'AppRevOwner', 'ReceiptByMe', 'ReviseByMe', 'LockedByMe', 'MyDocs'
|
||||
* @param SeedDMS_Core_User $param1 user
|
||||
* @param bool $param2 set to true
|
||||
* if 'ReviewByMe', 'ApproveByMe', 'AppRevByMe', 'ReviseByMe', 'ReceiptByMe'
|
||||
* shall return even documents I have already taken care of.
|
||||
* @param bool|integer|string $param2 if set to true
|
||||
* 'ReviewByMe', 'ApproveByMe', 'AppRevByMe', 'ReviseByMe', 'ReceiptByMe'
|
||||
* will also return documents which the reviewer, approver, etc.
|
||||
* has already taken care of. If set to false only
|
||||
* untouched documents will be returned. In case of 'ExpiredOwner' this
|
||||
* parameter contains the number of days (a negative number is allowed)
|
||||
* relativ to the current date or a date in format 'yyyy-mm-dd'
|
||||
* (even in the past).
|
||||
* @param string $param3 sort list by this field
|
||||
* @param string $param4 order direction
|
||||
* @param bool $param5 set to false if expired documents shall not be considered
|
||||
* @return array|bool
|
||||
*/
|
||||
function getDocumentList($listtype, $param1=null, $param2=false, $param3='', $param4='') { /* {{{ */
|
||||
function getDocumentList($listtype, $param1=null, $param2=false, $param3='', $param4='', $param5=true) { /* {{{ */
|
||||
/* The following query will get all documents and lots of additional
|
||||
* information. It requires the two temporary tables ttcontentid and
|
||||
* ttstatid.
|
||||
|
@ -1183,7 +1189,10 @@ class SeedDMS_Core_DMS {
|
|||
}
|
||||
|
||||
if (strlen($docCSV)>0) {
|
||||
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.", ".S_EXPIRED.") ".
|
||||
$docstatarr = array(S_DRAFT_REV, S_DRAFT_APP);
|
||||
if($param5)
|
||||
$docstatarr[] = S_EXPIRED;
|
||||
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".implode(',', $docstatarr).") ".
|
||||
"AND `tblDocuments`.`id` IN (" . $docCSV . ") ".
|
||||
"ORDER BY `statusDate` DESC";
|
||||
} else {
|
||||
|
@ -1221,7 +1230,10 @@ class SeedDMS_Core_DMS {
|
|||
$queryStr .= "OR `tblDocumentReviewers`.`type` = 1 AND `tblDocumentReviewers`.`required` IN (".implode(',', $groups).") ";
|
||||
$queryStr .= ") ";
|
||||
}
|
||||
$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).") ";
|
||||
if(!$param2)
|
||||
$queryStr .= " AND `tblDocumentReviewLog`.`status` = 0 ";
|
||||
if ($orderby=='e') $queryStr .= "ORDER BY `expires`";
|
||||
|
@ -1300,7 +1312,10 @@ class SeedDMS_Core_DMS {
|
|||
$queryStr .= "OR `tblDocumentApprovers`.`type` = 1 AND `tblDocumentApprovers`.`required` IN (".implode(',', $groups).")";
|
||||
$queryStr .= ") ";
|
||||
}
|
||||
$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).") ";
|
||||
if(!$param2)
|
||||
$queryStr .= " AND `tblDocumentApproveLog`.`status` = 0 ";
|
||||
if ($orderby=='e') $queryStr .= "ORDER BY `expires`";
|
||||
|
@ -1335,7 +1350,10 @@ class SeedDMS_Core_DMS {
|
|||
}
|
||||
|
||||
if (strlen($docCSV)>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).") ".
|
||||
"AND `tblDocuments`.`id` IN (" . $docCSV . ") ";
|
||||
//$queryStr .= "ORDER BY `statusDate` DESC";
|
||||
if ($orderby=='e') $queryStr .= "ORDER BY `expires`";
|
||||
|
|
|
@ -1878,6 +1878,7 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
|
|||
- add SeedDMS_Core_DatabaseAccess::hasTable()
|
||||
- add SeedDMS_Core_User->isType() and SeedDMS_Core_Group->isType()
|
||||
- add SeedDMS_Core_User->getDMS() and SeedDMS_Core_Group->getDMS()
|
||||
- add new parameter to SeedDMS_Core_DMS->getDocumentList() for skipping expired documents
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
|
|
Loading…
Reference in New Issue
Block a user