mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-05-02 20:23:11 +02:00
excludes initial flags when sorting
This commit is contained in:
parent
f81de41fe9
commit
2958450f95
23
h-m-m
23
h-m-m
|
@ -1252,7 +1252,7 @@ function move_active_node_to_sibling_or_parent(&$mm)
|
|||
}
|
||||
|
||||
// so, there's no item after it!
|
||||
$mm['active_node'] = end($mm['nodes'][ $mm['active_node'] ]['visible_children']);
|
||||
$mm['active_node'] = $parent_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3096,9 +3096,26 @@ function sort_siblings(&$mm)
|
|||
|
||||
foreach ($sibling_ids as $sid)
|
||||
if (mb_ereg('^\((\d+)\+,(\d+)\-\)', $mm['nodes'][$sid]['title'], $values))
|
||||
$siblings[ (9000000 - $values[1] + $values[2]).'.'.$sid ] = $sid;
|
||||
$siblings
|
||||
[
|
||||
(9000000 - $values[1] + $values[2])
|
||||
.'.'
|
||||
.$sid
|
||||
]
|
||||
= $sid;
|
||||
else
|
||||
$siblings[ $mm['nodes'][$sid]['title'].'.'.$sid ] = $sid;
|
||||
$siblings
|
||||
[
|
||||
mb_ereg_replace
|
||||
(
|
||||
'^\[HIDDEN\] |^'.$mm['symbol1'].' |^'.$mm['symbol2'].' '
|
||||
,''
|
||||
,$mm['nodes'][$sid]['title']
|
||||
)
|
||||
.'.'
|
||||
.$sid
|
||||
]
|
||||
= $sid;
|
||||
|
||||
ksort($siblings, SORT_NATURAL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue