From 219a5fcc14c4c99fae684d8755ab87dd89457216 Mon Sep 17 00:00:00 2001 From: Peter Thienel <thienel@data-quest.de> Date: Fri, 22 Mar 2024 09:23:02 +0000 Subject: [PATCH] changed code --- app/controllers/calendar/calendar.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/calendar/calendar.php b/app/controllers/calendar/calendar.php index a2b42e6aa7a..fd00956bc56 100644 --- a/app/controllers/calendar/calendar.php +++ b/app/controllers/calendar/calendar.php @@ -616,13 +616,10 @@ class Calendar_CalendarController extends AuthenticatedController uasort($users, function(User $a, User $b) { $fullname_a = $a->getFullName(); $fullname_b = $b->getFullName(); - if ($fullname_a < $fullname_b) { - return -1; - } elseif ($fullname_a > $fullname_b) { - return 1; - } else { + if ($fullname_a == $fullname_b) { return 0; } + return ($fullname_a > $fullname_b) ? 1 : -1; }); foreach ($users as $user) { -- GitLab