mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
add methods getApproveLog() and getReviewLog()
This commit is contained in:
parent
1d4bd6d1f0
commit
24be00ccd1
|
@ -3468,6 +3468,27 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return $this->_reviewStatus;
|
return $this->_reviewStatus;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the latest entries from the review log of the document content
|
||||||
|
*
|
||||||
|
* @param integer $limit the number of log entries returned, defaults to 1
|
||||||
|
* @return array list of review log entries
|
||||||
|
*/
|
||||||
|
function getReviewLog($limit=1) { /* {{{ */
|
||||||
|
$db = $this->_document->getDMS()->getDB();
|
||||||
|
|
||||||
|
if (!is_numeric($limit)) return false;
|
||||||
|
|
||||||
|
$queryStr=
|
||||||
|
"SELECT * FROM `tblDocumentReviewLog` LEFT JOIN `tblDocumentReviewers` ON `tblDocumentReviewLog`.`reviewID` = `tblDocumentReviewers`.`reviewID` WHERE `version`='".$this->_version
|
||||||
|
."' AND `documentID` = '". $this->_document->getID() ."' "
|
||||||
|
."ORDER BY `tblDocumentReviewLog`.`reviewLogID` DESC LIMIT ".(int) $limit;
|
||||||
|
$recs = $db->getResultArray($queryStr);
|
||||||
|
if (is_bool($recs) && !$recs)
|
||||||
|
return false;
|
||||||
|
return($recs);
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rewrites the complete review log
|
* Rewrites the complete review log
|
||||||
*
|
*
|
||||||
|
@ -3625,6 +3646,27 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return $this->_approvalStatus;
|
return $this->_approvalStatus;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the latest entries from the approval log of the document content
|
||||||
|
*
|
||||||
|
* @param integer $limit the number of log entries returned, defaults to 1
|
||||||
|
* @return array list of approval log entries
|
||||||
|
*/
|
||||||
|
function getApproveLog($limit=1) { /* {{{ */
|
||||||
|
$db = $this->_document->getDMS()->getDB();
|
||||||
|
|
||||||
|
if (!is_numeric($limit)) return false;
|
||||||
|
|
||||||
|
$queryStr=
|
||||||
|
"SELECT * FROM `tblDocumentApproveLog` LEFT JOIN `tblDocumentApprovers` ON `tblDocumentApproveLog`.`approveID` = `tblDocumentApprovers`.`approveID` WHERE `version`='".$this->_version
|
||||||
|
."' AND `documentID` = '". $this->_document->getID() ."' "
|
||||||
|
."ORDER BY `tblDocumentApproveLog`.`approveLogID` DESC LIMIT ".(int) $limit;
|
||||||
|
$recs = $db->getResultArray($queryStr);
|
||||||
|
if (is_bool($recs) && !$recs)
|
||||||
|
return false;
|
||||||
|
return($recs);
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rewrites the complete approval log
|
* Rewrites the complete approval log
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user