return true;
}
- foreach($this->children as $child) {
+ unset($entries);
+
+ $entries = array_keys($this->children);
+
+ foreach($entries as $entry) {
+ $child =& $this->children[$entry];
if (is_a($child, 'parentable_part_of_admin_tree')) {
if ($child->add($destinationname, $something, $precedence)) {
return true;
for ($i = 0; $i < count($this->choices) - 1; $i++) {
$return .='<select name="s_' . $this->name .'[]">';
foreach ($this->choices as $key => $value) {
- $return .= '<option value="' . $key . '"' . ($key == $currentsetting[$i] ? ' selected="selected"' : '') . '>' . $value . '</option>';
+ $return .= '<option value="' . $key . '"' . ($key == $currentsetting[$i] ? ' selected="selected"' : '') . '>' . $value . '</option>';
}
$return .= '</select>';
if ($i !== count($this->choices) - 2) {
}
$this->open_folder($content->visiblename);
-
- foreach ($content->children as &$child) {
- $this->build_tree($child);
+
+ unset($entries);
+
+ $entries = array_keys($content->children);
+
+ foreach ($entries as $entry) {
+ $this->build_tree($content->children[$entry]);
}
$this->close_folder();
// we need to do this instead of $this->build_tree($ADMIN) because the top-level folder
// is redundant (and ideally ignored). (the top-level folder is "administration".)
- ksort($ADMIN->children);
- foreach ($ADMIN->children as &$child) {
- $this->build_tree($child);
+
+ unset($entries);
+
+ $entries = array_keys($ADMIN->children);
+
+ asort($entries);
+
+ foreach ($entries as $entry) {
+ $this->build_tree($ADMIN->children[$entry]);
}
if ($this->tempcontent !== '') {