From 19d3453be68564da79d5898caaf02b7d66e9e5ed Mon Sep 17 00:00:00 2001 From: Jeffrey Reichardt Date: Sun, 30 Dec 2012 22:41:38 +0100 Subject: [PATCH] Usage simplified --- .../data/VersionableDatabaseObject.class.php | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/VersionableDatabaseObject.class.php b/wcfsetup/install/files/lib/data/VersionableDatabaseObject.class.php index e1f0c8ff47..a4d8b1d0cf 100644 --- a/wcfsetup/install/files/lib/data/VersionableDatabaseObject.class.php +++ b/wcfsetup/install/files/lib/data/VersionableDatabaseObject.class.php @@ -1,6 +1,7 @@ + */ + public function getVersions() { + $objectType = VersionHandler::getInstance()->getObjectTypeByName($this->versionableObjectTypeName); + + if ($objectType === null) { + throw new SystemException("Unknown versionable object type with name '".$this->versionableObjectTypeName."'"); + } + + return VersionHandler::getInstance()->getVersions($objectType->objectTypeID, $this->getObjectID()); + } } -- 2.20.1