From 3837e73b98753aa0bd5ab69bc9345bdf9d416228 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 2 Jul 2014 17:54:24 +0200 Subject: [PATCH] Add getObject() to EditHistoryEntry.class.php --- .../history/entry/EditHistoryEntry.class.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntry.class.php b/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntry.class.php index d4d59ed8f9..df01ccf4bd 100644 --- a/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntry.class.php +++ b/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntry.class.php @@ -1,5 +1,6 @@ message; } + + /** + * Returns the corresponding IHistorySavingObject + * + * @return \wcf\system\edit\IHistorySavingObject + */ + public function getObject() { + if ($this->object === null) { + $objectType = ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID); + $processor = $objectType->getProcessor(); + + $this->object = $processor->getObjectByID($this->objectID); + } + + return $this->object; + } } -- 2.20.1