From a47af6ed3727224510c650f271841d6945b7541c Mon Sep 17 00:00:00 2001 From: steinm Date: Thu, 7 Feb 2013 16:59:20 +0000 Subject: [PATCH] - added missing method setDocumentStatus() --- LetoDMS_Core/Core/inc.ClassWorkflow.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/LetoDMS_Core/Core/inc.ClassWorkflow.php b/LetoDMS_Core/Core/inc.ClassWorkflow.php index 9912b88f7..4e6f2c0ff 100644 --- a/LetoDMS_Core/Core/inc.ClassWorkflow.php +++ b/LetoDMS_Core/Core/inc.ClassWorkflow.php @@ -459,6 +459,18 @@ class LetoDMS_Core_Workflow_State { /* {{{ */ */ function getDocumentStatus() { return $this->_documentstatus; } + function setDocumentStatus($docstatus) { /* {{{ */ + $db = $this->_dms->getDB(); + + $queryStr = "UPDATE tblWorkflowStates SET documentstatus = ".intval($docstatus)." WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_documentstatus = $docstatus; + return true; + } /* }}} */ + /** * Check if workflow state is currently used by any workflow transition *