From 6078a0a85f38bbb115c0e043e8b3a71b064a6008 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 24 Jun 2013 21:24:06 +0200 Subject: [PATCH] Removing style descriptions on style delete --- wcfsetup/install/files/lib/data/style/StyleEditor.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index 4538256192..9b09ae587d 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -89,6 +89,12 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject if ($this->image) { @unlink(WCF_DIR.'images/'.$this->image); } + + // delete language items + $sql = "DELETE FROM wcf".WCF_N."_language_item + WHERE languageItem = ?"; + $statement = WCF::getDB()->prepareStatement($sql); + $statement->execute(array('wcf.style.styleDescription'.$this->styleID)); } /** -- 2.20.1