From 2a1022fb18da78483f9c07cf8dd7825584041822 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 9 May 2012 13:32:11 +0200 Subject: [PATCH] getPath() is now statically available through WCF::getPath() --- wcfsetup/install/files/lib/system/WCF.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index c4f220a0a6..868ab29a10 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -47,7 +47,7 @@ class WCF { * list of currently loaded applications * @var array */ - protected $applications = array(); + protected static $applications = array(); /** * list of autoload directories @@ -397,7 +397,7 @@ class WCF { */ protected function initApplications() { // register WCF as application - $this->applications['wcf'] = new Application(1); + self::$applications['wcf'] = new Application(1); // do not init applications if within wcf if (PACKAGE_ID == 1) return; @@ -408,7 +408,7 @@ class WCF { // register primary application $abbreviation = ApplicationHandler::getInstance()->getAbbreviation($application->packageID); - $this->applications[$abbreviation] = $application; + self::$applications[$abbreviation] = $application; // start dependent applications $applications = ApplicationHandler::getInstance()->getDependentApplications(); @@ -464,7 +464,7 @@ class WCF { } // register application - $this->applications[$abbreviation] = $application; + self::$applications[$abbreviation] = $application; } /** @@ -615,17 +615,17 @@ class WCF { * @param string $abbreviation * @return string */ - public function getPath($abbreviation = 'wcf') { + public static function getPath($abbreviation = 'wcf') { // workaround during WCFSetup if (!PACKAGE_ID) { return '../'; } - if (!isset($this->applications[$abbreviation])) { + if (!isset(self::$applications[$abbreviation])) { $abbreviation = 'wcf'; } - return $this->applications[$abbreviation]->domainName . $this->applications[$abbreviation]->domainPath; + return self::$applications[$abbreviation]->domainName . self::$applications[$abbreviation]->domainPath; } /** -- 2.20.1