From: Tim Düsterhus Date: Wed, 2 Jul 2014 15:54:24 +0000 (+0200) Subject: Add getObject() to EditHistoryEntry.class.php X-Git-Tag: 2.1.0_Alpha_1~590^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3837e73b98753aa0bd5ab69bc9345bdf9d416228;p=GitHub%2FWoltLab%2FWCF.git Add getObject() to EditHistoryEntry.class.php --- 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; + } }