From 4f5afb5ee2ef5741027ec2b3e7011b00fb32ce1f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 3 Dec 2015 17:15:57 +0100 Subject: [PATCH] SortBox: Fix "algorithm" to detect the opposite sort direction --- library/Icinga/Web/Widget/SortBox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Web/Widget/SortBox.php b/library/Icinga/Web/Widget/SortBox.php index 45ceebc44..deb95244d 100644 --- a/library/Icinga/Web/Widget/SortBox.php +++ b/library/Icinga/Web/Widget/SortBox.php @@ -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);