Browse Source
Adjust method name
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/371/head
Joas Schilling
8 years ago
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
3 changed files with
4 additions and
4 deletions
-
lib/Migration/FillRoomTokens.php
-
lib/Migration/Version2001002Date20170707115443.php
-
lib/Room.php
|
|
|
@ -92,7 +92,7 @@ class FillRoomTokens implements IRepairStep { |
|
|
|
$query = $this->connection->getQueryBuilder(); |
|
|
|
$query->select('*') |
|
|
|
->from('spreedme_rooms') |
|
|
|
->where($query->expr()->isEmptyString('token')); |
|
|
|
->where($query->expr()->emptyString('token')); |
|
|
|
$result = $query->execute(); |
|
|
|
|
|
|
|
$output->startProgress(); |
|
|
|
|
|
|
|
@ -123,7 +123,7 @@ class Version2001002Date20170707115443 extends SimpleMigrationStep { |
|
|
|
|
|
|
|
$update->update('spreedme_room_participants') |
|
|
|
->set('participantType', $update->createNamedParameter(Participant::MODERATOR)) |
|
|
|
->where($update->expr()->isNotEmptyString('userId')) |
|
|
|
->where($update->expr()->nonEmptyString('userId')) |
|
|
|
->andWhere($update->expr()->notIn('roomId', $update->createNamedParameter($one2oneRooms, IQueryBuilder::PARAM_INT_ARRAY))); |
|
|
|
|
|
|
|
return $update->execute(); |
|
|
|
|
|
|
|
@ -209,7 +209,7 @@ class Room { |
|
|
|
$query = $this->db->getQueryBuilder(); |
|
|
|
$query->delete('spreedme_room_participants') |
|
|
|
->where($query->expr()->eq('roomId', $query->createNamedParameter($this->getId(), IQueryBuilder::PARAM_INT))) |
|
|
|
->andWhere($query->expr()->isEmptyString('userId')); |
|
|
|
->andWhere($query->expr()->emptyString('userId')); |
|
|
|
$query->execute(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -341,7 +341,7 @@ class Room { |
|
|
|
$query = $this->db->getQueryBuilder(); |
|
|
|
$query->delete('spreedme_room_participants') |
|
|
|
->where($query->expr()->eq('roomId', $query->createNamedParameter($this->getId(), IQueryBuilder::PARAM_INT))) |
|
|
|
->andWhere($query->expr()->isEmptyString('userId')) |
|
|
|
->andWhere($query->expr()->emptyString('userId')) |
|
|
|
->andWhere($query->expr()->lte('lastPing', $query->createNamedParameter(time() - 30, IQueryBuilder::PARAM_INT))); |
|
|
|
$query->execute(); |
|
|
|
} |
|
|
|
|