Removing style descriptions on style delete
authorAlexander Ebert <ebert@woltlab.com>
Mon, 24 Jun 2013 19:24:06 +0000 (21:24 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 24 Jun 2013 19:24:06 +0000 (21:24 +0200)
wcfsetup/install/files/lib/data/style/StyleEditor.class.php

index 4538256192ab482570c3ccfd457c2a54e55e68be..9b09ae587d35c7956826b9a2efe9415ef93ca956 100644 (file)
@@ -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));
        }
        
        /**