From 02c1a7feeef0c609136784f38d5f67661f421200 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 1 Dec 2015 14:15:28 +0100 Subject: [PATCH] Added getApplicationByID() --- .../application/ApplicationHandler.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php index c9d1c85abb..137a0186f4 100644 --- a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php +++ b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php @@ -75,6 +75,20 @@ class ApplicationHandler extends SingletonFactory { return null; } + /** + * Returns an application by package id. + * + * @param integer $packageID package id + * @return Application application object + */ + public function getApplicationByID($packageID) { + if (isset($this->cache['application'][$packageID])) { + return $this->cache['application'][$packageID]; + } + + return null; + } + /** * Returns pseudo-application representing WCF used for special cases, * e.g. cross-domain files requestable through the webserver. -- 2.20.1