Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-03-21 19:25:23 +0300
committerJoas Schilling <coding@schilljs.com>2022-03-21 19:32:59 +0300
commitc27a6b3ef0e197cfc60a566036ec7d320522529b (patch)
tree2dd7021e1147b17d518e02d8fdef27ad27362191 /lib/Room.php
parent9d5cfbdd8dc8b0f27fb2357c9be62a6dd692f23b (diff)
Do not load the session in getParticipantByAttendeeId() as no caller needs it
Also fixes a problem with MariaDB ONLY_FULL_GROUP_BY and Oracle Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Room.php')
-rw-r--r--lib/Room.php19
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/Room.php b/lib/Room.php
index f9cdc1c19..2b6380216 100644
--- a/lib/Room.php
+++ b/lib/Room.php
@@ -567,13 +567,10 @@ class Room {
/**
* @param int $attendeeId
- * @param string|null|false $sessionId Set to false if you don't want to load a session (and save resources),
- * string to try loading a specific session
- * null to try loading "any"
* @return Participant
* @throws ParticipantNotFoundException When the pin is not valid (has no participant assigned)
*/
- public function getParticipantByAttendeeId(int $attendeeId, $sessionId = null): Participant {
+ public function getParticipantByAttendeeId(int $attendeeId): Participant {
$query = $this->db->getQueryBuilder();
$helper = new SelectHelper();
$helper->selectAttendeesTable($query);
@@ -582,20 +579,6 @@ class Room {
->andWhere($query->expr()->eq('a.room_id', $query->createNamedParameter($this->getId())))
->setMaxResults(1);
- if ($sessionId !== false) {
- if ($sessionId !== null) {
- $helper->selectSessionsTable($query);
- $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX(
- $query->expr()->eq('s.session_id', $query->createNamedParameter($sessionId)),
- $query->expr()->eq('a.id', 's.attendee_id')
- ));
- } else {
- $helper->selectSessionsTableMax($query);
- $query->groupBy('a.id');
- $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->eq('a.id', 's.attendee_id'));
- }
- }
-
$result = $query->executeQuery();
$row = $result->fetch();
$result->closeCursor();