SortBox: Fix "algorithm" to detect the opposite sort direction

This commit is contained in:
Johannes Meyer 2015-12-03 17:15:57 +01:00
parent 3d60e60842
commit 4f5afb5ee2
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ class SortBox extends AbstractWidget
// TODO(el): ToggleButton :)
$toggle = array('asc' => 'sort-name-down', 'desc' => 'sort-name-up');
unset($toggle[$direction]);
unset($toggle[strtolower($direction) ?: 'asc']);
$newDirection = key($toggle);
$icon = current($toggle);