/**
  * @see Action::execute()
  */
 public function execute()
 {
     parent::execute();
     // check permission
     WCF::getUser()->checkPermission('admin.language.canDeleteLanguage');
     // delete language variable
     require_once WCF_DIR . 'lib/system/language/LanguageEditor.class.php';
     LanguageEditor::deleteVariable($this->languageItem);
     // delete empty categories
     $deletedCategories = LanguageEditor::deleteEmptyCategories();
     $this->executed();
     // forward to list page
     if ($this->languageID && $this->languageCategoryID && !isset($deletedCategories[$this->languageCategoryID])) {
         HeaderUtil::redirect('index.php?form=LanguageEdit&languageID=' . $this->languageID . '&languageCategoryID=' . $this->languageCategoryID . '&deletedVariable=' . $this->languageItem . '&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED);
     } else {
         HeaderUtil::redirect('index.php?page=LanguageList&deletedVariable=' . $this->languageItem . '&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED);
     }
     exit;
 }
 /**
  * Deletes this help item.
  */
 public function delete()
 {
     // update show order
     $sql = "UPDATE\twcf" . WCF_N . "_help_item\n\t\t\tSET\tshowOrder = showOrder - 1\n\t\t\tWHERE\tshowOrder >= " . $this->showOrder . "\n\t\t\t\tAND parentHelpItem = '" . escapeString($this->parentHelpItem) . "'";
     WCF::getDB()->sendQuery($sql);
     // update children
     $sql = "UPDATE\twcf" . WCF_N . "_help_item\n\t\t\tSET\tparentHelpItem = '" . escapeString($this->parentHelpItem) . "'\n\t\t\tWHERE\tparentHelpItem = '" . escapeString($this->helpItem) . "'";
     WCF::getDB()->sendQuery($sql);
     // delete item
     $sql = "DELETE FROM\twcf" . WCF_N . "_help_item\n\t\t\tWHERE\t\thelpItemID = " . $this->helpItemID;
     WCF::getDB()->sendQuery($sql);
     // delete language variables
     LanguageEditor::deleteVariable('wcf.help.item.' . $this->helpItem);
     LanguageEditor::deleteVariable('wcf.help.item.' . $this->helpItem . '.description');
 }
 /**
  * Deletes this page menu item.
  */
 public function delete()
 {
     // update show order
     $sql = "UPDATE\twcf" . WCF_N . "_page_menu_item\r\n\t\t\tSET\tshowOrder = showOrder - 1\r\n\t\t\tWHERE\tshowOrder >= " . $this->showOrder . "\r\n\t\t\t\tAND menuPosition = '" . escapeString($this->menuPosition) . "'";
     WCF::getDB()->sendQuery($sql);
     // delte
     $sql = "DELETE FROM\twcf" . WCF_N . "_page_menu_item\n\t\t\tWHERE\t\tmenuItemID = " . $this->menuItemID;
     WCF::getDB()->sendQuery($sql);
     // delete language variables
     LanguageEditor::deleteVariable($this->menuItem);
 }