1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 07:12:41 +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:
epriestley 2012-08-31 11:52:24 -07:00
parent cc2225e34c
commit 2ea5c0bdda

View file

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