From 815b2ddfb06fbdb989eb2ece5774d19aa54575f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 2 Jul 2014 17:44:23 +0200 Subject: [PATCH] Add revert to EditHistoryEntryAction --- .../entry/EditHistoryEntryAction.class.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryAction.class.php b/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryAction.class.php index d6c004ebef..bec522d0a0 100644 --- a/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryAction.class.php +++ b/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryAction.class.php @@ -1,5 +1,6 @@ getSingleObject(); + + $objectType = ObjectTypeCache::getInstance()->getObjectType($historyEntry->objectTypeID); + $processor = $objectType->getProcessor(); + $object = $this->getSingleObject()->getObject(); + $processor->checkPermissions($object); + } + + /** + * Reverts the objects back to this history entry. + */ + public function revert() { + $this->getSingleObject()->getObject()->revertVersion($this->getSingleObject()->getDecoratedObject()); + } } -- 2.20.1