SeedDMS_Core_DMS::getTimeline() uses status log instead of document content

This commit is contained in:
Uwe Steinmann 2021-05-07 11:45:06 +02:00
parent c1e6a8360f
commit 3029bb195e
2 changed files with 8 additions and 2 deletions

View File

@ -3259,7 +3259,13 @@ class SeedDMS_Core_DMS {
/** @var SeedDMS_Core_Document[] $timeline */
$timeline = array();
$queryStr = "SELECT DISTINCT document FROM `tblDocumentContent` WHERE `date` > ".$startts." AND `date` < ".$endts." UNION SELECT DISTINCT document FROM `tblDocumentFiles` WHERE `date` > ".$startts." AND `date` < ".$endts;
if(0) {
$queryStr = "SELECT DISTINCT `document` FROM `tblDocumentContent` WHERE `date` > ".$startts." AND `date` < ".$endts." UNION SELECT DISTINCT `document` FROM `tblDocumentFiles` WHERE `date` > ".$startts." AND `date` < ".$endts;
} else {
$startdate = date('Y-m-d H:i:s', $startts);
$enddate = date('Y-m-d H:i:s', $endts);
$queryStr = "SELECT DISTINCT `documentID` AS `document` FROM `tblDocumentStatus` LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatus`.`statusId`=`tblDocumentStatusLog`.`statusID` WHERE `date` > ".$this->db->qstr($startdate)." AND `date` < ".$this->db->qstr($enddate)." UNION SELECT DISTINCT document FROM `tblDocumentFiles` WHERE `date` > ".$this->db->qstr($startdate)." AND `date` < ".$this->db->qstr($enddate)." UNION SELECT DISTINCT `document` FROM `tblDocumentFiles` WHERE `date` > ".$startts." AND `date` < ".$endts;
}
$resArr = $this->db->getResultArray($queryStr);
if ($resArr === false)
return false;

View File

@ -24,7 +24,7 @@
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- no changes
- SeedDMS_Core_DMS::getTimeline() uses status log instead of document content
</notes>
<contents>
<dir baseinstalldir="SeedDMS" name="/">