<instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.3_fixActivationMethod.php</instruction>
+ <instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.3_orphanedComments.php</instruction>
+
<instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.3_style.php</instruction>
<instruction type="style" run="standalone">defaultStyle.tar</instruction>
<!-- Run the option.xml update for 5.3.0 -> 5.3.1, due to the missing removal of external_link_rel_nofollow. -->
<!-- Run update_com.woltlab.wcf_5.3.1_style.php for 5.3.0 -> 5.3.1 -->
- <!-- Include `update_com.woltlab.wcf_5.2.10_orphanedComments.php` in the next update! -->
+ <!-- Include `update_com.woltlab.wcf_5.3_orphanedComments.php` in the next update! -->
<!-- Add a note about the updated CSS in email_html.tpl to the release notes:
https://github.com/WoltLab/WCF/commit/1ac55ad408d5bfab4f69714c6259cc5d09ceb344
Administrators are highly encouraged to apply the CSS adjustments to their custom template version.
+++ /dev/null
-<?php
-namespace wcf\acp;
-
-use wcf\data\object\type\ObjectTypeCache;
-use wcf\system\comment\CommentHandler;
-use wcf\system\WCF;
-
-// Earlier versions did remove moderation queues without taking care of
-// comments associated with them.
-$commentObjectTypeID = ObjectTypeCache::getInstance()->getObjectTypeIDByName(
- "com.woltlab.wcf.comment.commentableContent",
- "com.woltlab.wcf.moderation.queue"
-);
-
-$sql = "SELECT DISTINCT objectID
- FROM wcf" . WCF_N . "_comment
- WHERE objectTypeID = ?
- AND objectID NOT IN (
- SELECT queueID
- FROM wcf" . WCF_N . "_moderation_queue
- )";
-$statement = WCF::getDB()->prepareStatement($sql);
-$statement->execute([$commentObjectTypeID]);
-$objectIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
-
-CommentHandler::getInstance()->deleteObjects(
- "com.woltlab.wcf.moderation.queue",
- $objectIDs
-);
--- /dev/null
+<?php
+namespace wcf\acp;
+
+use wcf\data\object\type\ObjectTypeCache;
+use wcf\system\comment\CommentHandler;
+use wcf\system\WCF;
+
+// Earlier versions did remove moderation queues without taking care of
+// comments associated with them.
+$commentObjectTypeID = ObjectTypeCache::getInstance()->getObjectTypeIDByName(
+ "com.woltlab.wcf.comment.commentableContent",
+ "com.woltlab.wcf.moderation.queue"
+);
+
+$sql = "SELECT DISTINCT objectID
+ FROM wcf" . WCF_N . "_comment
+ WHERE objectTypeID = ?
+ AND objectID NOT IN (
+ SELECT queueID
+ FROM wcf" . WCF_N . "_moderation_queue
+ )";
+$statement = WCF::getDB()->prepareStatement($sql);
+$statement->execute([$commentObjectTypeID]);
+$objectIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
+
+CommentHandler::getInstance()->deleteObjects(
+ "com.woltlab.wcf.moderation.queue",
+ $objectIDs
+);