Added missing cache reset after creation of new menus
authorMarcel Werk <burntime@woltlab.com>
Fri, 15 Apr 2016 20:00:10 +0000 (22:00 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 15 Apr 2016 20:00:10 +0000 (22:00 +0200)
wcfsetup/install/files/lib/data/menu/MenuEditor.class.php

index ced425ef3e9a02b92bd06b71d463f6dad948da33..37f79a06e5ec81317d18fa877ccb7c681616538c 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 namespace wcf\data\menu;
 use wcf\data\DatabaseObjectEditor;
+use wcf\data\IEditableCachedObject;
+use wcf\system\cache\builder\MenuCacheBuilder;
 use wcf\system\language\LanguageFactory;
 use wcf\system\WCF;
 
@@ -15,7 +17,7 @@ use wcf\system\WCF;
  * @category   Community Framework
  * @since      2.2
  */
-class MenuEditor extends DatabaseObjectEditor {
+class MenuEditor extends DatabaseObjectEditor implements IEditableCachedObject {
        /**
         * @inheritDoc
         */
@@ -73,4 +75,11 @@ class MenuEditor extends DatabaseObjectEditor {
                
                return $menu;
        }
+       
+       /**
+        * @inheritDoc
+        */
+       public static function resetCache() {
+               MenuCacheBuilder::getInstance()->reset();
+       }
 }