check if next transitions exists

This commit is contained in:
Uwe Steinmann 2018-11-23 21:00:01 +01:00
parent 6ceb14cdfd
commit 7060484594

View File

@ -4641,10 +4641,11 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
if (!$this->_workflowState)
$this->getWorkflowState();
$workflowstate = $this->_workflowState;
$transitions = $this->_workflow->getNextTransitions($workflowstate);
foreach($transitions as $transition) {
if($this->triggerWorkflowTransitionIsAllowed($user, $transition)) {
$needwkflaction = true;
if($transitions = $this->_workflow->getNextTransitions($workflowstate)) {
foreach($transitions as $transition) {
if($this->triggerWorkflowTransitionIsAllowed($user, $transition)) {
$needwkflaction = true;
}
}
}
}