mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
Sort filters by localized name
The `UC_name_compare` function isn't defined, but was being used to sort the prefilter list. This change adds a anonymous function to do the sort comparison (on the filters' NAME attribute).
This commit is contained in:
committed by
Pierrick Le Gall
parent
7d0f08c5a9
commit
35f0450699
@@ -459,7 +459,11 @@ function UC_name_compare($a, $b)
|
||||
}
|
||||
|
||||
$prefilters = trigger_change('get_batch_manager_prefilters', $prefilters);
|
||||
usort($prefilters, 'UC_name_compare');
|
||||
|
||||
// Sort prefilters by localized name.
|
||||
usort($prefilters, function ($a, $b) {
|
||||
return strcmp(strtolower($a['NAME']), strtolower($b['NAME']));
|
||||
});
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user