From: Tim Düsterhus Date: Mon, 17 Jun 2013 12:38:30 +0000 (+0200) Subject: Use the URL provided by the package server when downloading packages X-Git-Tag: 2.0.0_Beta_4~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17493b7f112efe097ef4ce6953a77edaa81c3a5a;p=GitHub%2FWoltLab%2FWCF.git Use the URL provided by the package server when downloading packages --- diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php index 0a55a75481..ecfd6c0007 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php @@ -215,15 +215,23 @@ class PackageInstallationScheduler { // get auth data $authData = $this->getAuthData($packageUpdateVersion); - // create request - $request = new HTTPRequest( - $this->packageUpdateServers[$packageUpdateVersion['packageUpdateServerID']]->serverURL, - (!empty($authData) ? array('auth' => $authData) : array()), - array( - 'packageName' => $packageUpdateVersion['package'], - 'packageVersion' => $packageUpdateVersion['packageVersion'] - ) - ); + if ($packageUpdateVersion['filename']) { + $request = new HTTPRequest( + $packageUpdateVersion['filename'], + (!empty($authData) ? array('auth' => $authData) : array()) + ); + } + else { + // create request + $request = new HTTPRequest( + $this->packageUpdateServers[$packageUpdateVersion['packageUpdateServerID']]->serverURL, + (!empty($authData) ? array('auth' => $authData) : array()), + array( + 'packageName' => $packageUpdateVersion['package'], + 'packageVersion' => $packageUpdateVersion['packageVersion'] + ) + ); + } try { $request->execute();