mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-07 22:19:35 -05:00
Use natcasesort
This commit is contained in:
parent
1975cab74d
commit
7c491496fa
4 changed files with 7 additions and 7 deletions
|
|
@ -339,7 +339,7 @@ class AddNodeForm extends QuickForm
|
|||
}
|
||||
}
|
||||
|
||||
natsort($list);
|
||||
natcasesort($list);
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ class EditNodeForm extends QuickForm
|
|||
}
|
||||
}
|
||||
|
||||
natsort($list);
|
||||
natcasesort($list);
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -368,14 +368,14 @@ class BpConfig
|
|||
*/
|
||||
public function getRootNodes()
|
||||
{
|
||||
ksort($this->root_nodes);
|
||||
ksort($this->root_nodes, SORT_NATURAL | SORT_FLAG_CASE);
|
||||
return $this->root_nodes;
|
||||
}
|
||||
|
||||
public function listRootNodes()
|
||||
{
|
||||
$names = array_keys($this->root_nodes);
|
||||
sort($names);
|
||||
natcasesort($names);
|
||||
return $names;
|
||||
}
|
||||
|
||||
|
|
@ -665,7 +665,7 @@ class BpConfig
|
|||
$nodes[$name] = $name === $alias ? $name : sprintf('%s (%s)', $alias, $node);
|
||||
}
|
||||
|
||||
natsort($nodes);
|
||||
natcasesort($nodes);
|
||||
return $nodes;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ class BpNode extends Node
|
|||
|
||||
public function setChildNames($names)
|
||||
{
|
||||
sort($names);
|
||||
natcasesort($names);
|
||||
$this->childNames = $names;
|
||||
$this->children = null;
|
||||
return $this;
|
||||
|
|
@ -446,7 +446,7 @@ class BpNode extends Node
|
|||
{
|
||||
if ($this->children === null) {
|
||||
$this->children = array();
|
||||
natsort($this->childNames);
|
||||
natcasesort($this->childNames);
|
||||
foreach ($this->childNames as $name) {
|
||||
$this->children[$name] = $this->bp->getNode($name);
|
||||
$this->children[$name]->addParent($this);
|
||||
|
|
|
|||
Loading…
Reference in a new issue