From 669e16fe78f68c2804098352e195e0653282b0aa Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 6 Nov 2012 01:04:40 +0100 Subject: [PATCH] Fixed WCFSetup and creation of config files --- wcfsetup/install/files/lib/data/package/Package.class.php | 3 +-- wcfsetup/install/files/lib/system/WCFSetup.class.php | 2 +- .../files/lib/system/template/SetupTemplateEngine.class.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/data/package/Package.class.php b/wcfsetup/install/files/lib/data/package/Package.class.php index 20d926c3f6..85021f9330 100644 --- a/wcfsetup/install/files/lib/data/package/Package.class.php +++ b/wcfsetup/install/files/lib/data/package/Package.class.php @@ -616,12 +616,11 @@ class Package extends DatabaseObject { // write general information $file->write("// general info\n"); $file->write("if (!defined('RELATIVE_WCF_DIR')) define('RELATIVE_WCF_DIR', RELATIVE_".$currentPrefix."_DIR.'".FileUtil::getRelativePath($packageDir, WCF_DIR)."');\n"); - $file->write("if (!defined('PACKAGE_ID')) define('PACKAGE_ID', ".$row['packageID'].");\n"); + $file->write("if (!defined('PACKAGE_ID')) define('PACKAGE_ID', ".$packageID.");\n"); $file->write("if (!defined('PACKAGE_NAME')) define('PACKAGE_NAME', '".str_replace("'", "\'", $package->getName())."');\n"); $file->write("if (!defined('PACKAGE_VERSION')) define('PACKAGE_VERSION', '".$package->packageVersion."');\n"); // write end - $file->write("?>"); $file->close(); } diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index ee8f057392..e832b9b56f 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -193,7 +193,7 @@ class WCFSetup extends WCF { self::$tplObj = SetupTemplateEngine::getInstance(); self::getTPL()->setLanguageID((self::$selectedLanguageCode == 'en' ? 0 : 1)); self::getTPL()->setCompileDir(TMP_DIR); - self::getTPL()->addTemplatePath(PACKAGE_ID, TMP_DIR); + self::getTPL()->addApplication('wcf', PACKAGE_ID, TMP_DIR); self::getTPL()->registerPrefilter(array('lang')); self::getTPL()->assign(array( '__wcf' => $this, diff --git a/wcfsetup/install/files/lib/system/template/SetupTemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/SetupTemplateEngine.class.php index 83fb9531d3..868a7cd9fd 100644 --- a/wcfsetup/install/files/lib/system/template/SetupTemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/SetupTemplateEngine.class.php @@ -42,7 +42,7 @@ class SetupTemplateEngine extends TemplateEngine { /** * @see wcf\system\template\TemplateEngine::getPackageID() */ - public function getPackageID($templateName, $packageID) { + public function getPackageID($templateName, $application = 'wcf') { $path = $this->templatePaths[PACKAGE_ID].'setup/template/'.$templateName.'.tpl'; if (file_exists($path)) { return PACKAGE_ID; -- 2.20.1