From fb37eefd417db8bd8711740fea7186ca4ea2c8ff Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Mon, 7 Nov 2005 14:40:40 +0000 Subject: [PATCH] Add a Workflow Transition transaction type, and add a getByDocument lister. --- lib/documentmanagement/DocumentTransaction.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/documentmanagement/DocumentTransaction.inc b/lib/documentmanagement/DocumentTransaction.inc index 952f2e5..2eb4628 100644 --- a/lib/documentmanagement/DocumentTransaction.inc +++ b/lib/documentmanagement/DocumentTransaction.inc @@ -15,6 +15,7 @@ DEFINE("FORCE_CHECKIN", 12); DEFINE("EMAIL_LINK", 13); DEFINE("COLLAB_ACCEPT", 14); DEFINE("EMAIL_ATTACH", 15); +DEFINE("WORKFLOW_TRANSITION", 16); /** * $Id$ * @@ -102,6 +103,10 @@ class DocumentTransaction { return $this->sVersion; } + function getComment() { + return $this->sComment; + } + function _table() { global $default; return $default->document_transactions_table; @@ -197,7 +202,12 @@ class DocumentTransaction { * @return Array array of DocumentTransaction objects, false otherwise and set $_SESSION["errorMessage"] */ function getList($sWhereClause = null) { - return KTEntityUtil::getList(DocumentTransaction::_table(), 'DocumentTransaction', $sWhereClause); + return KTEntityUtil::getList2('DocumentTransaction', $sWhereClause); + } + + function getByDocument($oDocument) { + $iDocumentId = KTUtil::getId($oDocument); + return DocumentTransaction::getList(array('document_id = ?', array($iDocumentId))); } } ?> -- libgit2 0.21.4