mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
add check for cycles in workflow
This commit is contained in:
parent
9f5aa9c8be
commit
6448935150
|
@ -87,6 +87,15 @@ $(document).ready(function() {
|
|||
$workflowstates = $this->params['allworkflowstates'];
|
||||
|
||||
if($workflow) {
|
||||
$path = $workflow->checkForCycles();
|
||||
if($path) {
|
||||
$names = array();
|
||||
foreach($path as $state) {
|
||||
$names[] = $state->getName();
|
||||
}
|
||||
$this->errorMsg(getMLText('workflow_has_cycle').": ".implode(' <i class="icon-arrow-right"></i> ', $names));
|
||||
}
|
||||
|
||||
$transitions = $workflow->getTransitions();
|
||||
$initstate = $workflow->getInitState();
|
||||
$hasinitstate = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user