Merge pull request #7794 from AlfredSK/sorting-saved-folders-widget
Added usort() to the saved folders widget
This commit is contained in:
commit
ca5caa69f3
1 changed files with 4 additions and 0 deletions
|
@ -274,6 +274,10 @@ class Widget
|
||||||
foreach (FileTag::fileToArray($saved) as $savedFolderName) {
|
foreach (FileTag::fileToArray($saved) as $savedFolderName) {
|
||||||
$terms[] = ['ref' => $savedFolderName, 'name' => $savedFolderName];
|
$terms[] = ['ref' => $savedFolderName, 'name' => $savedFolderName];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usort($terms, function ($a, $b) {
|
||||||
|
return strcmp($a['name'], $b['name']);
|
||||||
|
});
|
||||||
|
|
||||||
return self::filter(
|
return self::filter(
|
||||||
'file',
|
'file',
|
||||||
|
|
Loading…
Reference in a new issue