/**
  * @see	\wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::import()
  */
 protected function import(array $row, array $data)
 {
     $result = parent::import($row, $data);
     if (empty($row) && $data['preset']) {
         $this->presetEventIDs[$result->eventID] = $data['presetMailNotificationType'];
     }
     return $result;
 }
 /**
  * @see	\wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::import()
  */
 protected function import(array $row, array $data)
 {
     // extract pages
     $pages = $data['pages'];
     unset($data['pages']);
     // import or update action
     $object = parent::import($row, $data);
     // store pages for later import
     $this->pages[$object->actionID] = $pages;
 }
 /**
  * @see	wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::prepareCreate()
  */
 protected function prepareCreate(array &$data)
 {
     parent::prepareCreate($data);
     $data['nextExec'] = TIME_NOW;
 }
 /**
  * Deletes languages, categories or items which where installed by the package.
  */
 public function uninstall()
 {
     parent::uninstall();
     // delete language to package relation
     $sql = "DELETE FROM\twcf" . WCF_N . "_language_to_package\n\t\t\tWHERE\t\tpackageID = ?";
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute(array($this->installation->getPackageID()));
     // delete language items
     // Get all items and their categories
     // which where installed from this package.
     $sql = "SELECT\tlanguageItemID, languageCategoryID, languageID\n\t\t\tFROM\twcf" . WCF_N . "_language_item\n\t\t\tWHERE\tpackageID = ?";
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute(array($this->installation->getPackageID()));
     $itemIDs = array();
     $categoryIDs = array();
     while ($row = $statement->fetchArray()) {
         $itemIDs[] = $row['languageItemID'];
         // Store categories
         $categoryIDs[$row['languageCategoryID']] = true;
     }
     if (count($itemIDs) > 0) {
         $sql = "DELETE FROM\twcf" . WCF_N . "_" . $this->tableName . "\n\t\t\t\tWHERE\t\tlanguageItemID = ?\n\t\t\t\t\t\tAND packageID = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         foreach ($itemIDs as $itemID) {
             $statement->execute(array($itemID, $this->installation->getPackageID()));
         }
         $this->deleteEmptyCategories(array_keys($categoryIDs), $this->installation->getPackageID());
     }
 }
 /**
  * @see	wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()
  */
 public function uninstall()
 {
     parent::uninstall();
     $this->cleanup();
 }
 /**
  * @see	\wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()
  */
 public function uninstall()
 {
     // delete options
     parent::uninstall();
     // delete categories
     $sql = "DELETE FROM\t" . $this->application . WCF_N . "_" . $this->tableName . "_category\n\t\t\tWHERE\t\tpackageID = ?";
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute(array($this->installation->getPackageID()));
 }
 /**
  * @see	wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()
  */
 public function uninstall()
 {
     parent::uninstall();
     // clear cache immediately
     CacheHandler::getInstance()->clear(WCF_DIR . 'cache', 'cache.sitemap-*.php');
 }
 /**
  * @see	\wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::import()
  */
 protected function import(array $row, array $data)
 {
     // extract attributes
     $attributes = $data['attributes'];
     unset($data['attributes']);
     // import or update action
     $object = parent::import($row, $data);
     // store attributes for later import
     $this->attributes[$object->bbcodeID] = $attributes;
 }
	/**
	 * @see	wcf\system\package\plugin\IPackageInstallationPlugin::uninstall()
	 */
	public function uninstall() {
		parent::uninstall();
		
		// clear cache immediately
		EventListenerCacheBuilder::getInstance()->reset();
	}