/**
  * @see PackageInstallationPlugin::install()
  */
 public function install()
 {
     parent::install();
     // extract files.tar to temp folder
     $tag = $this->installation->getXMLTag('acptemplates');
     $sourceFile = $this->installation->getArchive()->extractTar($tag['cdata'], 'acptemplates_');
     // create file handler
     $fileHandler = new ACPTemplatesFileHandler($this->installation);
     // extract content of files.tar
     $packageDir = FileUtil::addTrailingSlash(FileUtil::getRealPath(WCF_DIR . $this->installation->getPackage()->getDir()));
     try {
         $fileInstaller = $this->installation->extractFiles($packageDir . 'acp/templates/', $sourceFile, $fileHandler);
     } catch (SystemException $e) {
         if (!@file_exists(WCF_DIR . 'acp/templates/packageInstallationFileInstallationFailed.tpl')) {
             // workaround for wcf 1.0 to 1.1 update
             throw $e;
         } else {
             WCF::getTPL()->assign(array('exception' => $e));
             WCF::getTPL()->display('packageInstallationFileInstallationFailed');
             exit;
         }
     }
     // look if tpl files are to be overwritten by this update,
     // and if so, check if these files have been patched before ...
     require_once WCF_DIR . 'lib/acp/package/plugin/ACPTemplatePatchPackageInstallationPlugin.class.php';
     $tar = new Tar($sourceFile);
     $files = $tar->getContentList();
     $templatePatch = new ACPTemplatePatchPackageInstallationPlugin($this->installation);
     $templatePatch->repatch($files);
     // delete temporary sourceArchive
     @unlink($sourceFile);
 }
 /**
  * @see PackageInstallationPlugin::install()
  */
 public function install()
 {
     parent::install();
     // extract files.tar to temp folder
     $tag = $this->installation->getXMLTag('acptemplates');
     $sourceFile = $this->installation->getArchive()->extractTar($tag['cdata'], 'acptemplates_');
     // create file handler
     $fileHandler = new ACPTemplatesFileHandler($this->installation);
     // extract content of files.tar
     $packageDir = FileUtil::addTrailingSlash(FileUtil::getRealPath(WCF_DIR . $this->installation->getPackage()->getDir()));
     $fileInstaller = $this->installation->extractFiles($packageDir . 'acp/templates/', $sourceFile, $fileHandler);
     // look if tpl files are to be overwritten by this update,
     // and if so, check if these files have been patched before ...
     require_once WCF_DIR . 'lib/acp/package/plugin/ACPTemplatePatchPackageInstallationPlugin.class.php';
     $tar = new Tar($sourceFile);
     $files = $tar->getContentList();
     $templatePatch = new ACPTemplatePatchPackageInstallationPlugin($this->installation);
     $templatePatch->repatch($files);
     // delete temporary sourceArchive
     @unlink($sourceFile);
 }