mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 06:31:21 +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'];
|
$workflowstates = $this->params['allworkflowstates'];
|
||||||
|
|
||||||
if($workflow) {
|
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();
|
$transitions = $workflow->getTransitions();
|
||||||
$initstate = $workflow->getInitState();
|
$initstate = $workflow->getInitState();
|
||||||
$hasinitstate = true;
|
$hasinitstate = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user