From: Marcel Werk Date: Tue, 3 Sep 2013 18:14:36 +0000 (+0200) Subject: Fixed import issue X-Git-Tag: 2.0.0_Beta_8~20 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1f464eaca366930c8df2ce3a0ef74ac9a7a33e6;p=GitHub%2FWoltLab%2FWCF.git Fixed import issue --- diff --git a/wcfsetup/install/files/lib/system/importer/AbstractLikeImporter.class.php b/wcfsetup/install/files/lib/system/importer/AbstractLikeImporter.class.php index a7f9b25fbf..3361e6cf6d 100644 --- a/wcfsetup/install/files/lib/system/importer/AbstractLikeImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/AbstractLikeImporter.class.php @@ -1,6 +1,6 @@ getNewID('com.woltlab.wcf.user', $data['objectUserID']); $data['userID'] = ImportHandler::getInstance()->getNewID('com.woltlab.wcf.user', $data['userID']); if (!$data['userID']) return 0; + if (empty($data['time'])) $data['time'] = 0; - $like = LikeEditor::create(array_merge($data, array('objectTypeID' => $this->objectTypeID))); + $sql = "INSERT IGNORE INTO wcf".WCF_N."_like + (objectID, objectTypeID, objectUserID, userID, time, likeValue) + VALUES (?, ?, ?, ?, ?, ?)"; + $statement = WCF::getDB()->prepareStatement($sql); + $statement->execute(array( + $data['objectID'], + $data['objectTypeID'], + $data['objectUserID'], + $data['userID'], + $data['time'], + $data['likeValue'] + )); - return $like->likeID; + return 0; } }