From: Alexander Ebert Date: Mon, 11 Jun 2012 23:26:05 +0000 (+0200) Subject: Added enhanced __get() for ModificationLog X-Git-Tag: 2.0.0_Beta_1~1006^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b7a3a845cde0195efc1c87b85f9b36e15023e8e0;p=GitHub%2FWoltLab%2FWCF.git Added enhanced __get() for ModificationLog --- 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; + } }