From b7a3a845cde0195efc1c87b85f9b36e15023e8e0 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 12 Jun 2012 01:26:05 +0200 Subject: [PATCH] Added enhanced __get() for ModificationLog --- .../modification/log/ModificationLog.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/wcfsetup/install/files/lib/data/modification/log/ModificationLog.class.php b/wcfsetup/install/files/lib/data/modification/log/ModificationLog.class.php index c95ce05bfa..d2369ad121 100644 --- a/wcfsetup/install/files/lib/data/modification/log/ModificationLog.class.php +++ b/wcfsetup/install/files/lib/data/modification/log/ModificationLog.class.php @@ -22,4 +22,20 @@ class ModificationLog extends DatabaseObject { * @see wcf\data\DatabaseObject::$databaseTableIndexName */ protected static $databaseTableIndexName = 'logID'; + + /** + * @see wcf\data\IStorableObject::__get() + */ + public function __get($name) { + $value = parent::__get($name); + + // treat additional data as data variables if it is an array + if ($value === null) { + if (is_array($this->data['additionalData']) && isset($this->data['additionalData'][$name])) { + $value = $this->data['additionalData'][$name]; + } + } + + return $value; + } } -- 2.20.1