Remove unnecessary explicit `__toString()` calls
authorMatthias Schmidt <gravatronics@live.com>
Wed, 20 Jan 2021 05:51:44 +0000 (06:51 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 20 Jan 2021 05:51:44 +0000 (06:51 +0100)
files/lib/data/conversation/ConversationParticipantList.class.php
files/lib/data/conversation/UserConversationList.class.php
files/lib/system/conversation/ConversationHandler.class.php

index 004c0c19bb8a8f2a570788f35889aa9568ad1999..2ce263b477cd6940f17405ff44564abca88f86d7 100644 (file)
@@ -69,7 +69,7 @@ class ConversationParticipantList extends UserProfileList
         $sql = "SELECT  COUNT(*) AS count
                 FROM    wcf" . WCF_N . "_conversation_to_user conversation_to_user
                 " . $this->sqlConditionJoins . "
-                " . $this->getConditionBuilder()->__toString();
+                " . $this->getConditionBuilder();
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($this->getConditionBuilder()->getParameters());
         $row = $statement->fetchArray();
@@ -86,7 +86,7 @@ class ConversationParticipantList extends UserProfileList
         $sql = "SELECT  conversation_to_user.participantID AS objectID
                 FROM    wcf" . WCF_N . "_conversation_to_user conversation_to_user
                 " . $this->sqlConditionJoins . "
-                " . $this->getConditionBuilder()->__toString() . "
+                " . $this->getConditionBuilder() . "
                 " . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : '');
         $statement = WCF::getDB()->prepareStatement($sql, $this->sqlLimit, $this->sqlOffset);
         $statement->execute($this->getConditionBuilder()->getParameters());
index 244fc1a5c3463750bacd2e13a1a07ea8ee18cba3..46a40fc4b823c18a674e195a4037ca9434ce97ae 100644 (file)
@@ -122,7 +122,7 @@ class UserConversationList extends ConversationList
         $sql = "SELECT  COUNT(*) AS count
                 FROM    wcf" . WCF_N . "_conversation_to_user conversation_to_user
                 " . $this->sqlConditionJoins . "
-                " . $this->getConditionBuilder()->__toString();
+                " . $this->getConditionBuilder();
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($this->getConditionBuilder()->getParameters());
         $row = $statement->fetchArray();
@@ -144,7 +144,7 @@ class UserConversationList extends ConversationList
         $sql = "SELECT  conversation_to_user.conversationID AS objectID
                 FROM    wcf" . WCF_N . "_conversation_to_user conversation_to_user
                     " . $this->sqlConditionJoins . "
-                    " . $this->getConditionBuilder()->__toString() . "
+                    " . $this->getConditionBuilder() . "
                     " . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : '');
         $statement = WCF::getDB()->prepareStatement($sql, $this->sqlLimit, $this->sqlOffset);
         $statement->execute($this->getConditionBuilder()->getParameters());
index 555f11764bf9195353337ab5fa0b521d87c6f735..82ae57d050847303ed0885c7d65ee665a98dcbf6 100644 (file)
@@ -119,11 +119,11 @@ class ConversationHandler extends SingletonFactory
                 $sql = "SELECT (
                             SELECT  COUNT(*)
                             FROM    wcf" . WCF_N . "_conversation_to_user conversation_to_user
-                            " . $conditionBuilder1->__toString() . "
+                            " . $conditionBuilder1 . "
                         ) + (
                             SELECT  COUNT(*)
                             FROM    wcf" . WCF_N . "_conversation conversation
-                            " . $conditionBuilder2->__toString() . "
+                            " . $conditionBuilder2 . "
                         ) AS count";
                 $statement = WCF::getDB()->prepareStatement($sql);
                 $statement->execute(\array_merge(