fix access on workflow object

This commit is contained in:
Uwe Steinmann 2020-08-31 15:31:29 +02:00
parent ee656527c2
commit 012dbeaf27

View File

@ -3902,7 +3902,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
if($this->_workflow) {
if (!$this->_workflowState)
$this->getWorkflowState();
$transitions = $this->_workflow->getNextTransitions($this->_workflowState);
$transitions = $this->_workflow['workflow']->getNextTransitions($this->_workflowState);
foreach($transitions as $transition) {
if($this->triggerWorkflowTransitionIsAllowed($u, $transition))
return M_READ;
@ -6428,7 +6428,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
$workflowlogs = array();
$i = 0;
$workflowlog = new SeedDMS_Core_Workflow_Log($resArr[$i]["id"], $this->_document->getDMS()->getDocument($resArr[$i]["document"]), $resArr[$i]["version"], $this->_workflow, $this->_document->getDMS()->getUser($resArr[$i]["userid"]), $this->_workflow->getTransition($resArr[$i]["transition"]), $resArr[$i]["date"], $resArr[$i]["comment"]);
$workflowlog = new SeedDMS_Core_Workflow_Log($resArr[$i]["id"], $this->_document->getDMS()->getDocument($resArr[$i]["document"]), $resArr[$i]["version"], $this->_workflow, $this->_document->getDMS()->getUser($resArr[$i]["userid"]), $this->_workflow['workflow']->getTransition($resArr[$i]["transition"]), $resArr[$i]["date"], $resArr[$i]["comment"]);
$workflowlog->setDMS($this);
return $workflowlog;