mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Sort ghost children correctly in Phriction
Summary: Currently, if some page /x/ has a grandchild at /x/y/z/ but /x/y/ does not exist, we insert a ghost entry for it in the "Document Hierarchy". However, we don't sort the hierarchy properly after inserting ghosts, so they always appear at the bottom and in an unuseful order. Instead, sort children again after any ghost insertions. Test Plan: Created /x/a/, /y/a/, /z/a/, verified ghosts sorted incorrectly before this patch and correctly afterward. Reviewers: btrahan, vrana Reviewed By: vrana CC: aran Maniphest Tasks: T1750 Differential Revision: https://secure.phabricator.com/D3418
This commit is contained in:
parent
cc2225e34c
commit
2ea5c0bdda
1 changed files with 2 additions and 0 deletions
|
@ -353,6 +353,8 @@ final class PhrictionDocumentController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$children = isort($children, 'title');
|
||||||
|
|
||||||
$list = array();
|
$list = array();
|
||||||
$list[] = '<ul>';
|
$list[] = '<ul>';
|
||||||
foreach ($children as $child) {
|
foreach ($children as $child) {
|
||||||
|
|
Loading…
Reference in a new issue