Fixes error message of unknown modifiable content object types
authorMatthias Schmidt <gravatronics@live.com>
Fri, 3 May 2013 13:43:06 +0000 (15:43 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 3 May 2013 13:43:06 +0000 (15:43 +0200)
wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php

index 98e30c41b032e93de5333f802971eaccd8372da1..88bdbc26c5707c549096cec319c68d6da99dfa12 100644 (file)
@@ -11,7 +11,7 @@ use wcf\system\WCF;
  * Handles modification logs.
  * 
  * @author     Alexander Ebert
- * @copyright  2001-2012 WoltLab GmbH
+ * @copyright  2001-2013 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    com.woltlab.wcf
  * @subpackage system.log.modification
@@ -60,13 +60,13 @@ class ModificationLogHandler extends SingletonFactory {
         * @return      wcf\data\modification\log\ModificationLog
         */
        protected function _add($objectType, $objectID, $action, array $additionalData = array(), $time = TIME_NOW, $userID = null, $username = null) {
-               $objectType = $this->getObjectType($objectType);
-               if ($objectType === null) {
+               $objectTypeObj = $this->getObjectType($objectType);
+               if ($objectTypeObj === null) {
                        throw new SystemException("Object type '".$objectType."' not found within definition 'com.woltlab.wcf.modifiableContent'");
                }
                
                return ModificationLogEditor::create(array(
-                       'objectTypeID' => $objectType->objectTypeID,
+                       'objectTypeID' => $objectTypeObj->objectTypeID,
                        'objectID' => $objectID,
                        'action' => $action,
                        'userID' => ($userID === null ? WCF::getUser()->userID : $userID),
@@ -83,13 +83,13 @@ class ModificationLogHandler extends SingletonFactory {
         * @param       array<integer>  $objectIDs
         */
        protected function _remove($objectType, array $objectIDs) {
-               $objectType = $this->getObjectType($objectType);
-               if ($objectType === null) {
+               $objectTypeObj = $this->getObjectType($objectType);
+               if ($objectTypeObj === null) {
                        throw new SystemException("Object type '".$objectType."' not found within definition 'com.woltlab.wcf.modifiableContent'");
                }
                
                $conditions = new PreparedStatementConditionBuilder();
-               $conditions->add("objectTypeID = ?", array($objectType->objectTypeID));
+               $conditions->add("objectTypeID = ?", array($objectTypeObj->objectTypeID));
                $conditions->add("objectID IN (?)", array($objectIDs));
                
                $sql = "DELETE FROM     wcf".WCF_N."_modification_log