Sort folders by natural name

pull/37/head
Varun Patil 2022-08-20 08:45:50 +00:00
parent 1dd0c2b23a
commit 2242d2b4d9
1 changed files with 5 additions and 0 deletions

View File

@ -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,