/** * 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_packages\n\t\t\tWHERE\t\tpackageID = " . $this->installation->getPackageID(); WCF::getDB()->sendQuery($sql); // 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 = " . $this->installation->getPackageID(); $result = WCF::getDB()->sendQuery($sql); $itemIDs = array(); $categoryIDs = array(); while ($row = WCF::getDB()->fetchArray($result)) { $itemIDs[] = $row['languageItemID']; // Store categories $categoryIDs[$row['languageCategoryID']] = true; } if (count($itemIDs) > 0) { $sql = "DELETE\tFROM wcf" . WCF_N . "_language_item\n\t\t\t\tWHERE\tlanguageItemID IN (" . implode(", ", $itemIDs) . ")\n\t\t\t\tAND\tpackageID = " . $this->installation->getPackageID(); WCF::getDB()->sendQuery($sql); $this->deleteEmptyCategories(array_keys($categoryIDs), $this->installation->getPackageID()); } }
/** * @see PackageInstallationPlugin::uninstall() */ public function uninstall() { parent::uninstall(); // clear cache immediately require_once WCF_DIR . 'lib/data/dynamic/page/module/template/DynamicPageModuleTemplateEditor.class.php'; DynamicPageModuleTemplateEditor::clearCache(); }
/** * @see PackageInstallationPlugin::uninstall() */ public function uninstall() { // delete attributes $sql = "DELETE FROM\twcf" . WCF_N . "_bbcode_attribute\n\t\t\tWHERE\t\tbbcodeID IN (\n\t\t\t\t\t\tSELECT\tbbcodeID\n\t\t\t\t\t\tFROM\twcf" . WCF_N . "_bbcode\n\t\t\t\t\t\tWHERE\tpackageID = " . $this->installation->getPackageID() . "\n\t\t\t\t\t)"; WCF::getDB()->sendQuery($sql); parent::uninstall(); }
/** * @see PackageInstallationPlugin::uninstall() */ public function uninstall() { parent::uninstall(); $this->updateStyleFiles(); }
/** * @see PackageInstallationPlugin::uninstall() */ public function uninstall() { parent::uninstall(); // clear cache immediately WCF::getCache()->clear(WCF_DIR . 'cache', 'cache.eventListener-*.php'); }
/** * Uninstalls option categories and options. */ public function uninstall() { // delete options parent::uninstall(); // delete categories $sql = "DELETE FROM\twcf" . WCF_N . "_" . $this->tableName . "_category\n\t\t\tWHERE\t\tpackageID = " . $this->installation->getpackageID(); WCF::getDB()->sendQuery($sql); }