Browse Source

Adjust method name

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/371/head
Joas Schilling 8 years ago
parent
commit
f88b1766f5
No known key found for this signature in database GPG Key ID: E166FD8976B3BAC8
  1. 2
      lib/Migration/FillRoomTokens.php
  2. 2
      lib/Migration/Version2001002Date20170707115443.php
  3. 4
      lib/Room.php

2
lib/Migration/FillRoomTokens.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();

2
lib/Migration/Version2001002Date20170707115443.php

@ -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();

4
lib/Room.php

@ -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();
}

Loading…
Cancel
Save