From 6edf3169b430752560baa595fa2776e6fbf8410b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 11 Mar 2013 22:33:17 +0100 Subject: [PATCH] Clear cache after pruning --- file/lib/data/room/RoomAction.class.php | 6 ++++++ file/lib/data/room/RoomEditor.class.php | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/file/lib/data/room/RoomAction.class.php b/file/lib/data/room/RoomAction.class.php index ef84c10..1848c28 100644 --- a/file/lib/data/room/RoomAction.class.php +++ b/file/lib/data/room/RoomAction.class.php @@ -27,6 +27,12 @@ class RoomAction extends \wcf\data\AbstractDatabaseObjectAction implements \wcf\ */ protected $permissionsUpdate = array('admin.chat.canEditRoom'); + /** + * Resets cache if any of the listed actions is invoked + * @var array + */ + protected $resetCache = array('create', 'delete', 'toggle', 'update', 'updatePosition', 'prune'); + /** * Fixes create to append new rooms. */ diff --git a/file/lib/data/room/RoomEditor.class.php b/file/lib/data/room/RoomEditor.class.php index 0bb25f5..12fcc9e 100644 --- a/file/lib/data/room/RoomEditor.class.php +++ b/file/lib/data/room/RoomEditor.class.php @@ -50,9 +50,9 @@ public static function deleteAll(array $objectIDs = array()) { $update->execute(array($select->fetchColumn())); } - // The transaction is being committed in parent::deleteAll() - // The beginTransaction() call in there is simply ignored. - return parent::deleteAll($objectIDs); + $return = parent::deleteAll($objectIDs); + WCF::getDB()->commitTransaction(); + return $return; } /**