From 26e70750b70b1e1ef457883a2fb008b16ece7bbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 23 Feb 2021 11:16:33 +0100 Subject: [PATCH] Simplify object type sorting in RebuildDataPage --- .../files/lib/acp/page/RebuildDataPage.class.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/page/RebuildDataPage.class.php b/wcfsetup/install/files/lib/acp/page/RebuildDataPage.class.php index adaa1dd928..ad72c12a57 100644 --- a/wcfsetup/install/files/lib/acp/page/RebuildDataPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/RebuildDataPage.class.php @@ -44,16 +44,7 @@ class RebuildDataPage extends AbstractPage // sort object types \uasort($this->objectTypes, static function ($a, $b) { - $niceValueA = ($a->nicevalue ?: 0); - $niceValueB = ($b->nicevalue ?: 0); - - if ($niceValueA < $niceValueB) { - return -1; - } elseif ($niceValueA > $niceValueB) { - return 1; - } - - return 0; + return ($a->nicevalue ?: 0) <=> ($b->nicevalue ?: 0); }); } -- 2.20.1