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 *