/** * Deletes all posts with the given post ids. */ public static function deleteAllCompletely($postIDs, $deleteAttachments = true, $deletePolls = true, $updateUserStats = true) { if (empty($postIDs)) { return; } // delete attachments if ($deleteAttachments) { require_once WCF_DIR . 'lib/data/attachment/MessageAttachmentListEditor.class.php'; $attachment = new MessageAttachmentListEditor(explode(',', $postIDs)); $attachment->deleteAll(); } // delete polls if ($deletePolls) { require_once WCF_DIR . 'lib/data/message/poll/PollEditor.class.php'; PollEditor::deleteAll($postIDs); } // update user posts & activity points if ($updateUserStats) { self::updateUserStats($postIDs, 'delete'); } // delete sql data self::deleteData($postIDs); }