Merge pull request #7794 from AlfredSK/sorting-saved-folders-widget

Added usort() to the saved folders widget
This commit is contained in:
Hypolite Petovan 2019-11-01 22:58:37 -04:00 committed by GitHub
commit ca5caa69f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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