Improve backwards compatibility of AbstractModificationLogHandler
authorMatthias Schmidt <gravatronics@live.com>
Sat, 6 Feb 2016 14:22:05 +0000 (15:22 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 6 Feb 2016 14:22:05 +0000 (15:22 +0100)
wcfsetup/install/files/lib/system/log/modification/AbstractModificationLogHandler.class.php

index 4fbc4fbb67c30547ef1eda46b0bfabcbdc889c54..d09c0ad25759d4c32c1b6421cc88e850300c302e 100644 (file)
@@ -36,7 +36,7 @@ abstract class AbstractModificationLogHandler extends SingletonFactory {
        protected $objectTypeName = '';
        
        /**
-        * @inheritdoc
+        * @inheritDoc
         * @throws      SystemException
         */
        protected function init() {
@@ -140,9 +140,15 @@ abstract class AbstractModificationLogHandler extends SingletonFactory {
        /**
         * Returns the modifiable content object type.
         * 
+        * @param       string          $objectType     name of the modifiable content object type, deprecated parameter
         * @return      ObjectType
         */
-       public function getObjectType() {
+       public function getObjectType($objectType = null) {
+               // allow parameter for better backwards compatibility with ModificationLogHandler
+               if ($objectType !== null) {
+                       return ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.modifiableContent', $objectType);
+               }
+               
                return $this->objectType;
        }