Invoke PackageUpdateDispatcher::refreshPackageData() directly in LicensePage
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 29 Sep 2023 12:42:31 +0000 (14:42 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 29 Sep 2023 12:43:05 +0000 (14:43 +0200)
wcfsetup/install/files/lib/acp/page/LicensePage.class.php

index 6ecb670e6e95ee8e66bd57e869fc74d9f16f6a49..1bfaad9bf4b20fd2e53dd571f7633a9ec4e4f98e 100644 (file)
@@ -6,12 +6,12 @@ use Laminas\Diactoros\Response\RedirectResponse;
 use wcf\acp\form\LicenseEditForm;
 use wcf\data\package\Package;
 use wcf\data\package\update\PackageUpdate;
-use wcf\data\package\update\PackageUpdateAction;
 use wcf\data\package\update\server\PackageUpdateServer;
 use wcf\page\AbstractPage;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\package\license\LicenseApi;
 use wcf\system\package\license\LicenseData;
+use wcf\system\package\PackageUpdateDispatcher;
 use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 
@@ -58,7 +58,7 @@ final class LicensePage extends AbstractPage
             );
         }
 
-        (new PackageUpdateAction([], 'refreshDatabase'))->executeAction();
+        PackageUpdateDispatcher::getInstance()->refreshPackageDatabase();
 
         $licenseApi = new LicenseApi();
         $this->licenseData = $licenseApi->fetchFromRemote();