Purge compiled templates after template deletion
authorAlexander Ebert <ebert@woltlab.com>
Fri, 6 Mar 2015 13:35:54 +0000 (14:35 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 6 Mar 2015 13:35:54 +0000 (14:35 +0100)
wcfsetup/install/files/lib/data/template/TemplateAction.class.php

index 47e6630f3260bd1c898ffabe6ea693b9f3267a0b..65bb2fefa3f276836052ada73a473bfe7f62816c 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 namespace wcf\data\template;
 use wcf\data\AbstractDatabaseObjectAction;
+use wcf\system\language\LanguageFactory;
 
 /**
  * Executes template-related actions.
@@ -52,6 +53,17 @@ class TemplateAction extends AbstractDatabaseObjectAction {
                return $template;
        }
        
+       /**
+        * @see \wcf\data\AbstractDatabaseObjectAction::delete()
+        */
+       public function delete() {
+               $count = parent::delete();
+               
+               LanguageFactory::getInstance()->deleteLanguageCache();
+               
+               return $count;
+       }
+       
        /**
         * @see \wcf\data\AbstractDatabaseObjectAction::update()
         */