Use natcasesort

This commit is contained in:
Eric Lippmann 2018-08-13 13:30:33 +02:00
parent 1975cab74d
commit 7c491496fa
4 changed files with 7 additions and 7 deletions

View file

@ -339,7 +339,7 @@ class AddNodeForm extends QuickForm
}
}
natsort($list);
natcasesort($list);
return $list;
}

View file

@ -374,7 +374,7 @@ class EditNodeForm extends QuickForm
}
}
natsort($list);
natcasesort($list);
return $list;
}

View file

@ -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;
}

View file

@ -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);