Skip to content
Snippets Groups Projects
Commit 2e28ec96 authored by David Siegfried's avatar David Siegfried
Browse files

remove useless sorting, closes #1425

Closes #1425

Merge request studip/studip!907
parent 10b62f9b
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment