From 2e28ec964b459b3cf4033aa4648ef02d6bf9fb75 Mon Sep 17 00:00:00 2001 From: David Siegfried <david.siegfried@uni-vechta.de> Date: Fri, 19 Aug 2022 21:02:42 +0000 Subject: [PATCH] remove useless sorting, closes #1425 Closes #1425 Merge request studip/studip!907 --- lib/resources/RoomManager.class.php | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/lib/resources/RoomManager.class.php b/lib/resources/RoomManager.class.php index f1a71a82353..b4ca702f928 100644 --- a/lib/resources/RoomManager.class.php +++ b/lib/resources/RoomManager.class.php @@ -667,34 +667,6 @@ class RoomManager } } - //sort $result array by building name and then by room name: - usort($result, function ($a, $b) { - if ($a->building->name > $b->building->name) { - return 1; - } elseif ($a->building->name < $b->building->name) { - return -1; - } else { - //building names are identical: compare room names: - if ($a->name > $b->name) { - return 1; - } elseif ($a->name < $b->name) { - return -1; - } else { - //building names and room names are identical: - //order by mkdate - if ($a->mkdate > $b->mkdate) { - return 1; - } elseif ($a->mkdate < $b->mkdate) { - return -1; - } else { - //Even the mkdate is equal? - //Well then there is nothing else we can do here... - return 0; - } - } - } - }); - return $result; } -- GitLab