From 0ad16f9a145d33e7cfc17bf7f46e8b46241fe7d5 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 28 Feb 2013 21:13:03 +0100 Subject: [PATCH] Removed obsolete code Fixes #1152 --- com.woltlab.wcf/packageInstallationPlugin.xml | 1 - ...ageIconPackageInstallationPlugin.class.php | 54 ------------------- wcfsetup/setup/db/install.sql | 1 - 3 files changed, 56 deletions(-) delete mode 100644 wcfsetup/install/files/lib/system/package/plugin/PackageIconPackageInstallationPlugin.class.php diff --git a/com.woltlab.wcf/packageInstallationPlugin.xml b/com.woltlab.wcf/packageInstallationPlugin.xml index 140fd6b14e..6a6fb4c6b1 100644 --- a/com.woltlab.wcf/packageInstallationPlugin.xml +++ b/com.woltlab.wcf/packageInstallationPlugin.xml @@ -20,7 +20,6 @@ wcf\system\package\plugin\TemplatePackageInstallationPlugin wcf\system\package\plugin\UserGroupOptionPackageInstallationPlugin wcf\system\package\plugin\UserOptionPackageInstallationPlugin - wcf\system\package\plugin\PackageIconPackageInstallationPlugin wcf\system\package\plugin\SitemapPackageInstallationPlugin wcf\system\package\plugin\ACPSearchProviderPackageInstallationPlugin wcf\system\package\plugin\StylePackageInstallationPlugin diff --git a/wcfsetup/install/files/lib/system/package/plugin/PackageIconPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/PackageIconPackageInstallationPlugin.class.php deleted file mode 100644 index ce6e26e94e..0000000000 --- a/wcfsetup/install/files/lib/system/package/plugin/PackageIconPackageInstallationPlugin.class.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage system.package.plugin - * @category Community Framework - */ -class PackageIconPackageInstallationPlugin extends AbstractPackageInstallationPlugin { - /** - * @see wcf\system\package\plugin\IPackageInstallationPlugin::install() - */ - public function install() { - parent::install(); - - // search sql files in package archive - if (($fileIndex = $this->installation->getArchive()->getTar()->getIndexByFilename($this->instruction['value'])) === false) { - throw new SystemException("Package icon '".$this->instruction['value']."' not found."); - } - - // get extension - $extension = substr($this->instruction['value'], strrpos($this->instruction['value'], '.')); - - // extract image - $this->installation->getArchive()->getTar()->extract($fileIndex, WCF_DIR . 'icon/packages/' . $this->installation->getPackage()->packageID . $extension); - - // update package - $packageEditor = new PackageEditor($this->installation->getPackage()); - $packageEditor->update(array( - 'packageIcon' => 'icon/packages/' . $packageEditor->packageID . $extension - )); - } - - /** - * @see wcf\system\package\plugin\IPackageInstallationPlugin::uninstall() - */ - public function uninstall() { - // call uninstall event - EventHandler::getInstance()->fireAction($this, 'uninstall'); - - $packageIcon = $this->installation->getPackage()->packageIcon; - if (!empty($packageIcon)) { - @unlink(WCF_DIR . $packageIcon); - } - } -} diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index 792a334159..0c2742de4c 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -331,7 +331,6 @@ CREATE TABLE wcf1_package ( isApplication TINYINT(1) NOT NULL DEFAULT 0, author VARCHAR(255) NOT NULL DEFAULT '', authorURL VARCHAR(255) NOT NULL DEFAULT '', - packageIcon VARCHAR(30) NOT NULL DEFAULT '', KEY package (package) ); -- 2.20.1