From: Tim Düsterhus Date: Thu, 10 Feb 2022 10:49:41 +0000 (+0100) Subject: Use `->prepare()` instead if `->prepareStatement()` in ConversationEditor::removePart... X-Git-Tag: 5.5.0_Alpha_1~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=43f5baf0209656a5909da083ec55ea6fcd0590df;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Use `->prepare()` instead if `->prepareStatement()` in ConversationEditor::removeParticipant() --- diff --git a/files/lib/data/conversation/ConversationEditor.class.php b/files/lib/data/conversation/ConversationEditor.class.php index c337fc9..1c98e78 100644 --- a/files/lib/data/conversation/ConversationEditor.class.php +++ b/files/lib/data/conversation/ConversationEditor.class.php @@ -171,20 +171,20 @@ class ConversationEditor extends DatabaseObjectEditor public function removeParticipant($userID) { $sql = "SELECT joinedAt - FROM wcf" . WCF_N . "_conversation_to_user + FROM wcf1_conversation_to_user WHERE conversationID = ? AND participantID = ?"; - $statement = WCF::getDB()->prepareStatement($sql, 1); + $statement = WCF::getDB()->prepare($sql, 1); $statement->execute([$this->conversationID, $userID]); $joinedAt = $statement->fetchSingleColumn(); $sql = "SELECT messageID - FROM wcf" . WCF_N . "_conversation_message + FROM wcf1_conversation_message WHERE conversationID = ? AND time >= ? AND time <= ? ORDER BY time DESC"; - $statement = WCF::getDB()->prepareStatement($sql, 1); + $statement = WCF::getDB()->prepare($sql, 1); $statement->execute([ $this->conversationID, $joinedAt, @@ -192,13 +192,13 @@ class ConversationEditor extends DatabaseObjectEditor ]); $lastMessageID = $statement->fetchSingleColumn(); - $sql = "UPDATE wcf" . WCF_N . "_conversation_to_user + $sql = "UPDATE wcf1_conversation_to_user SET leftAt = ?, lastMessageID = ?, leftByOwnChoice = ? WHERE conversationID = ? AND participantID = ?"; - $statement = WCF::getDB()->prepareStatement($sql); + $statement = WCF::getDB()->prepare($sql); $statement->execute([ TIME_NOW, $lastMessageID ?: null,