Sort folders by natural name
parent
1dd0c2b23a
commit
2242d2b4d9
|
@ -146,6 +146,11 @@ class ApiController extends Controller {
|
|||
return $item->getParent()->getId() === $node->getId();
|
||||
});
|
||||
|
||||
// Sort by name
|
||||
usort($sub, function($a, $b) {
|
||||
return strnatcmp($a->getName(), $b->getName());
|
||||
});
|
||||
|
||||
// Map sub to JSON array
|
||||
$subdirArray = [
|
||||
"day_id" => -0.1,
|
||||
|
|
Loading…
Reference in New Issue