mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-12 01:54:57 +00:00
search for each reception status (no action, rejected, acknowledged)
This commit is contained in:
parent
9746c85ce5
commit
3e777f987d
|
@ -1117,7 +1117,7 @@ class SeedDMS_Core_DMS {
|
|||
* @param expirationenddate array search for documents expiring before this date
|
||||
* @return array containing the elements total and docs
|
||||
*/
|
||||
function search($query, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=null, $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x3, $expirationstartdate=array(), $expirationenddate=array(), $missingreception=false) { /* {{{ */
|
||||
function search($query, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=null, $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x3, $expirationstartdate=array(), $expirationenddate=array(), $reception=array()) { /* {{{ */
|
||||
// Split the search string into constituent keywords.
|
||||
$tkeys=array();
|
||||
if (strlen($query)>0) {
|
||||
|
@ -1416,7 +1416,7 @@ class SeedDMS_Core_DMS {
|
|||
// Construct the SQL query that will be used to search the database.
|
||||
//
|
||||
|
||||
if (!$this->db->createTemporaryTable("ttcontentid") || !$this->db->createTemporaryTable("ttstatid")) {
|
||||
if (!$this->db->createTemporaryTable("ttcontentid") || !$this->db->createTemporaryTable("ttstatid") || !$this->db->createTemporaryTable("ttreceiptid")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1432,7 +1432,9 @@ class SeedDMS_Core_DMS {
|
|||
"LEFT JOIN `tblDocumentCategory` ON `tblDocuments`.`id`=`tblDocumentCategory`.`documentID` ".
|
||||
"LEFT JOIN `tblDocumentRecipients` ON `tblDocuments`.`id`=`tblDocumentRecipients`.`documentID` ".
|
||||
"LEFT JOIN `tblDocumentReceiptLog` ON `tblDocumentRecipients`.`receiptID`=`tblDocumentReceiptLog`.`receiptID` ".
|
||||
"LEFT JOIN `ttreceiptid` ON `ttreceiptid`.`maxLogID` = `tblDocumentReceiptLog`.`receiptLogID` ".
|
||||
"WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ".
|
||||
"AND `ttreceiptid`.`maxLogID`=`tblDocumentReceiptLog`.`receiptLogID` ".
|
||||
"AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version`";
|
||||
|
||||
if (strlen($searchKey)>0) {
|
||||
|
@ -1462,8 +1464,8 @@ class SeedDMS_Core_DMS {
|
|||
$searchQuery .= " AND `tblDocumentStatusLog`.`status` IN (".implode(',', $status).")";
|
||||
}
|
||||
|
||||
if($missingreception)
|
||||
$searchQuery .= " AND `tblDocumentReceiptLog`.`status`=0";
|
||||
if($reception)
|
||||
$searchQuery .= " AND `tblDocumentReceiptLog`.`status` IN (".implode(',', $reception).")";
|
||||
|
||||
if($searchKey || $searchOwner || $searchCategories || $searchCreateDate || $searchExpirationDate || $searchAttributes || $status) {
|
||||
// Count the number of rows that the search will produce.
|
||||
|
|
Loading…
Reference in New Issue
Block a user