From: Alexander Ebert Date: Sun, 27 Jan 2013 04:43:46 +0000 (+0100) Subject: Attempt to fix applications during package installation X-Git-Tag: 2.0.0_Beta_1~537^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5e92c58fbbbfdf7d74db1aae9be7c21ae84ef7b5;p=GitHub%2FWoltLab%2FWCF.git Attempt to fix applications during package installation --- diff --git a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php index b0bea841c5..458df83eac 100644 --- a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php +++ b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php @@ -108,11 +108,12 @@ class ApplicationHandler extends SingletonFactory { * @return array */ public function getDependentApplications() { - $applications = array(); - foreach ($this->cache['application'] as $packageID => $application) { - if ($packageID == PACKAGE_ID) continue; - - $applications[] = $application; + $applications = $this->getApplications(); + foreach ($applications as $key => $application) { + if ($application->packageID == $this->getActiveApplication()->packageID) { + unset($applications[$key]); + break; + } } return $applications; @@ -124,10 +125,7 @@ class ApplicationHandler extends SingletonFactory { * @return array */ public function getApplications() { - $applications = $this->getDependentApplications(); - $applications[] = $this->getActiveApplication(); - - return $applications; + return $this->cache['application']; } /**