Removed obsolete code
authorMarcel Werk <burntime@woltlab.com>
Thu, 28 Feb 2013 20:13:03 +0000 (21:13 +0100)
committerMarcel Werk <burntime@woltlab.com>
Thu, 28 Feb 2013 20:13:03 +0000 (21:13 +0100)
Fixes #1152

com.woltlab.wcf/packageInstallationPlugin.xml
wcfsetup/install/files/lib/system/package/plugin/PackageIconPackageInstallationPlugin.class.php [deleted file]
wcfsetup/setup/db/install.sql

index 140fd6b14e4306744bb1f911f495b470c81faa14..6a6fb4c6b17629b89b1a84bfd80a8ea42584aecf 100644 (file)
@@ -20,7 +20,6 @@
                <pip name="template">wcf\system\package\plugin\TemplatePackageInstallationPlugin</pip>
                <pip name="userGroupOption">wcf\system\package\plugin\UserGroupOptionPackageInstallationPlugin</pip>
                <pip name="userOption">wcf\system\package\plugin\UserOptionPackageInstallationPlugin</pip>
-               <pip name="packageIcon">wcf\system\package\plugin\PackageIconPackageInstallationPlugin</pip>
                <pip name="sitemap">wcf\system\package\plugin\SitemapPackageInstallationPlugin</pip>
                <pip name="acpSearchProvider">wcf\system\package\plugin\ACPSearchProviderPackageInstallationPlugin</pip>
                <pip name="style">wcf\system\package\plugin\StylePackageInstallationPlugin</pip>
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 (file)
index ce6e26e..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-namespace wcf\system\package\plugin;
-use wcf\data\package\PackageEditor;
-use wcf\system\event\EventHandler;
-use wcf\system\exception\SystemException;
-
-/**
- * Installs, updates and deletes the package icon of a package.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2012 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @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);
-               }
-       }
-}
index 792a3341594510bafca4286420e7dbf419565726..0c2742de4cc9b2b9795076982967d3ba63d0c32c 100644 (file)
@@ -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)
 );