Skip to content

Commit 232ef0e

Browse files
committed
Apply suggestions from code review
1 parent 7f0ae05 commit 232ef0e

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

files/lib/data/conversation/ConversationCollection.class.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ private function loadAssignedLabels(): void
121121
$statement = WCF::getDB()->prepare($sql);
122122
$statement->execute($conditions->getParameters());
123123
while ($row = $statement->fetchArray()) {
124-
if (!isset($this->assignedLabels[$row['conversationID']])) {
125-
$this->assignedLabels[$row['conversationID']] = [];
126-
}
127-
128124
$this->assignedLabels[$row['conversationID']][$row['labelID']] = $labels[$row['labelID']];
129125
}
130126
}
@@ -192,7 +188,7 @@ private function loadParticipantSummaries(): void
192188
\array_merge($conditions->getParameters(), [5])
193189
);
194190

195-
$rows = $statement->fetchAll();
191+
$rows = $statement->fetchAll(\PDO::FETCH_ASSOC);
196192
foreach ($rows as $row) {
197193
if ($row['userID']) {
198194
UserProfileRuntimeCache::getInstance()->cacheObjectID($row['userID']);

files/lib/data/conversation/message/ConversationMessageCollection.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private function loadTeaserImages(): void
167167
\array_merge($conditions->getParameters(), [1])
168168
);
169169

170-
$rows = $statement->fetchAll();
170+
$rows = $statement->fetchAll(\PDO::FETCH_ASSOC);
171171
foreach ($rows as $row) {
172172
FileRuntimeCache::getInstance()->cacheObjectID($row['fileID']);
173173
}

files/lib/data/conversation/participant/ConversationParticipantAction.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
*
1515
* @extends AbstractDatabaseObjectAction<ConversationParticipant, ConversationParticipantEditor>
1616
*/
17-
class UserRankAction extends AbstractDatabaseObjectAction {}
17+
class ConversationParticipantAction extends AbstractDatabaseObjectAction {}

0 commit comments

Comments
 (0)