// 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();
}
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,
/**
* @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;