From 5e92c58fbbbfdf7d74db1aae9be7c21ae84ef7b5 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 27 Jan 2013 05:43:46 +0100 Subject: [PATCH] Attempt to fix applications during package installation --- .../application/ApplicationHandler.class.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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']; } /** -- 2.20.1