Commit fb37eefd417db8bd8711740fea7186ca4ea2c8ff

Authored by Neil Blakey-Milner
1 parent 7e2f0c1c

Add a Workflow Transition transaction type, and add a getByDocument

lister.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3923 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/documentmanagement/DocumentTransaction.inc
@@ -15,6 +15,7 @@ DEFINE("FORCE_CHECKIN", 12); @@ -15,6 +15,7 @@ DEFINE("FORCE_CHECKIN", 12);
15 DEFINE("EMAIL_LINK", 13); 15 DEFINE("EMAIL_LINK", 13);
16 DEFINE("COLLAB_ACCEPT", 14); 16 DEFINE("COLLAB_ACCEPT", 14);
17 DEFINE("EMAIL_ATTACH", 15); 17 DEFINE("EMAIL_ATTACH", 15);
  18 +DEFINE("WORKFLOW_TRANSITION", 16);
18 /** 19 /**
19 * $Id$ 20 * $Id$
20 * 21 *
@@ -102,6 +103,10 @@ class DocumentTransaction { @@ -102,6 +103,10 @@ class DocumentTransaction {
102 return $this->sVersion; 103 return $this->sVersion;
103 } 104 }
104 105
  106 + function getComment() {
  107 + return $this->sComment;
  108 + }
  109 +
105 function _table() { 110 function _table() {
106 global $default; 111 global $default;
107 return $default->document_transactions_table; 112 return $default->document_transactions_table;
@@ -197,7 +202,12 @@ class DocumentTransaction { @@ -197,7 +202,12 @@ class DocumentTransaction {
197 * @return Array array of DocumentTransaction objects, false otherwise and set $_SESSION["errorMessage"] 202 * @return Array array of DocumentTransaction objects, false otherwise and set $_SESSION["errorMessage"]
198 */ 203 */
199 function getList($sWhereClause = null) { 204 function getList($sWhereClause = null) {
200 - return KTEntityUtil::getList(DocumentTransaction::_table(), 'DocumentTransaction', $sWhereClause); 205 + return KTEntityUtil::getList2('DocumentTransaction', $sWhereClause);
  206 + }
  207 +
  208 + function getByDocument($oDocument) {
  209 + $iDocumentId = KTUtil::getId($oDocument);
  210 + return DocumentTransaction::getList(array('document_id = ?', array($iDocumentId)));
201 } 211 }
202 } 212 }
203 ?> 213 ?>