From: Tim Düsterhus Date: Wed, 2 Jul 2014 15:44:23 +0000 (+0200) Subject: Add revert to EditHistoryEntryAction X-Git-Tag: 2.1.0_Alpha_1~590^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=815b2ddfb06fbdb989eb2ece5774d19aa54575f8;p=GitHub%2FWoltLab%2FWCF.git Add revert to EditHistoryEntryAction --- 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()); + } }