Simplify the condition to order the packages
authorAlexander Ebert <ebert@woltlab.com>
Tue, 5 Sep 2023 14:31:41 +0000 (16:31 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 5 Sep 2023 14:31:41 +0000 (16:31 +0200)
wcfsetup/install/files/lib/acp/page/LicensePage.class.php

index 12518e02e8608a1fd26c65a7e2ffe356a22f5845..896bb25a58cb47ec8f83ab1e1f9f1ed7dde1c1f8 100644 (file)
@@ -90,11 +90,7 @@ final class LicensePage extends AbstractPage
                 $a = $this->installedPackages[$packageA] ?? $this->packageUpdates[$packageA];
                 $b = $this->installedPackages[$packageB] ?? $this->packageUpdates[$packageB];
 
-                if ($a->isApplication === $b->isApplication) {
-                    return $a->getName() <=> $b->getName();
-                }
-
-                return $b->isApplication <=> $a->isApplication;
+                return ($b->isApplication <=> $a->isApplication) ?: ($a->getName() <=> $b->getName());
             });
         }
     }