mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
- check for equal states and missing user/group
This commit is contained in:
parent
275ecc04a2
commit
66b23748d2
|
@ -58,6 +58,10 @@ if (!is_object($nextstate)) {
|
|||
UI::exitError(getMLText("workflow_title"),getMLText("invalid_workflow_state_id"));
|
||||
}
|
||||
|
||||
if($state->getID() == $nextstate->getID()) {
|
||||
UI::exitError(getMLText("workflow_title"),getMLText("equal_transition_states"));
|
||||
}
|
||||
|
||||
if (!isset($_POST["action"]) || !is_numeric($_POST["action"])) {
|
||||
UI::exitError(getMLText("workflow_title"),getMLText("invalid_workflow_action_id"));
|
||||
}
|
||||
|
@ -80,6 +84,10 @@ if (isset($_POST["groups"]) && is_array($_POST["groups"])) {
|
|||
}
|
||||
}
|
||||
|
||||
if(!$users && !$groups) {
|
||||
UI::exitError(getMLText("workflow_title"),getMLText("missing_transition_user_group"));
|
||||
}
|
||||
|
||||
if($transition = $workflow->addTransition($state, $action, $nextstate, $users, $groups)) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user