<packagedescription><![CDATA[Free web-framework, designed and developed for complex community applications.]]></packagedescription>
<packagedescription language="de"><![CDATA[Freies Web-Framework, das für komplexe Community-Anwendungen entworfen und entwickelt wurde.]]></packagedescription>
<isapplication>1</isapplication>
- <version>2.0.3</version> <!-- codename: maelstrom -->
+ <version>2.0.4</version> <!-- codename: maelstrom -->
<date>2014-03-02</date>
</packageinformation>
<instruction type="userMenu">userMenu.xml</instruction>
<instruction type="userNotificationEvent">userNotificationEvent.xml</instruction>
<instruction type="aclOption">aclOption.xml</instruction>
- <instruction type="script">acp/post_install.php</instruction>
+ <instruction type="script">acp/post_install.php</instruction>
</instructions>
- <instructions type="update" fromversion="2.0.2 pl 1">
+ <instructions type="update" fromversion="2.0.3">
<instruction type="acpTemplate">acptemplates_update.tar</instruction>
<instruction type="file">files_update.tar</instruction>
<instruction type="template">templates_update.tar</instruction>
- <instruction type="script">acp/update_com.woltlab.wcf_2.0.3.php</instruction>
+ <instruction type="script">acp/update_com.woltlab.wcf_2.0.4.php</instruction>
- <instruction type="language">languages/*.xml</instruction>
- <instruction type="option">option.xml</instruction>
+ <!-- todo: other pips -->
</instructions>
</package>
+++ /dev/null
-<?php
-use wcf\system\WCF;
-
-/**
- * @author Alexander Ebert
- * @copyright 2001-2014 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @category Community Framework
- */
-// enforce new limits for session timeout (prevents misconfiguration)
-$sql = "SELECT optionID, optionValue
- FROM wcf".WCF_N."_option
- WHERE optionName = ?";
-$statement = WCF::getDB()->prepareStatement($sql);
-$statement->execute(array('session_timeout'));
-$row = $statement->fetchArray();
-
-$sql = "UPDATE wcf".WCF_N."_option
- SET optionValue = ?
- WHERE optionID = ?";
-$statement = WCF::getDB()->prepareStatement($sql);
-$statement->execute(array(
- min(max(600, $row['optionValue']), 86400),
- $row['optionID']
-));
--- /dev/null
+<?php
+use wcf\data\like\object\LikeObjectList;
+use wcf\data\object\type\ObjectTypeCache;
+use wcf\system\like\LikeHandler;
+
+/**
+ * @author Matthias Schmidt
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @category Community Framework
+ */
+// delete likes for deleted comments responses
+$likeObjectList = new LikeObjectList();
+$likeObjectList->sqlJoins = "LEFT JOIN wcf".WCF_N."_comment_response comment_response ON (comment_response.responseID = like_object.objectID)";
+$likeObjectList->getConditionBuilder()->add('like_object.objectTypeID = ?', array(ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.like.likeableObject', 'com.woltlab.wcf.comment.response')));
+$likeObjectList->getConditionBuilder()->add('comment_response.responseID IS NULL');
+$likeObjectList->readObjects();
+
+$deletedResponseIDs = array();
+foreach ($likeObjectList as $likeObject) {
+ $deletedResponseIDs[] = $likeObject->objectID;
+}
+
+LikeHandler::getInstance()->removeLikes('com.woltlab.wcf.comment.response', $deletedResponseIDs);