Remove support for filtering the results of PackageUpdateServer::getActiveUpdateServers()
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 20 Aug 2020 13:09:50 +0000 (15:09 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 20 Aug 2020 13:09:50 +0000 (15:09 +0200)
wcfsetup/install/files/lib/data/package/update/server/PackageUpdateServer.class.php

index 2f831a75b347264fb360ad346bde77f404d04ddd..96686c23cb239f2132597c8d561d78bf2701f8a8 100644 (file)
@@ -68,11 +68,12 @@ class PackageUpdateServer extends DatabaseObject {
         * @return      PackageUpdateServer[]
         */
        public static final function getActiveUpdateServers(array $packageUpdateServerIDs = []) {
-               $list = new PackageUpdateServerList();
-               $list->getConditionBuilder()->add("isDisabled = ?", [0]);
                if (!empty($packageUpdateServerIDs)) {
-                       $list->getConditionBuilder()->add("packageUpdateServerID IN (?)", [$packageUpdateServerIDs]);
+                       throw new \InvalidArgumentException("Filtering package update servers by ID is no longer supported.");
                }
+               
+               $list = new PackageUpdateServerList();
+               $list->getConditionBuilder()->add("isDisabled = ?", [0]);
                $list->readObjects();
                
                if (ENABLE_ENTERPRISE_MODE) {