From 43f5baf0209656a5909da083ec55ea6fcd0590df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 10 Feb 2022 11:49:41 +0100 Subject: [PATCH] Use `->prepare()` instead if `->prepareStatement()` in ConversationEditor::removeParticipant() --- .../data/conversation/ConversationEditor.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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, -- 2.20.1