mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-04 01:09:25 -05:00
NodeMoveAction: Interpret $from as index and not as display value
This commit is contained in:
parent
bc03569765
commit
93a2589909
1 changed files with 4 additions and 3 deletions
|
|
@ -90,12 +90,13 @@ class NodeMoveAction extends NodeAction
|
|||
$this->error('Node "%s" not found at position %d', $name, $this->from);
|
||||
}
|
||||
} else {
|
||||
if (! $config->hasNode($name)) {
|
||||
if (! $config->hasRootNode($name)) {
|
||||
$this->error('Toplevel process "%s" not found', $name);
|
||||
}
|
||||
|
||||
if ($config->getBpNode($name)->getDisplay() !== $this->from + 1) {
|
||||
$this->error('Toplevel process "%s" not found at position %d', $name, $this->from + 1);
|
||||
$nodes = $config->listRootNodes();
|
||||
if (! isset($nodes[$this->from]) || $nodes[$this->from] !== $name) {
|
||||
$this->error('Toplevel process "%s" not found at position %d', $name, $this->from);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue