Also shorten the name of the invitation tokens
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
b7de6d7a24
commit
daed1bed57
|
@ -45,7 +45,7 @@ class CleanupInvitationTokenJob extends TimedJob {
|
|||
|
||||
public function run($argument) {
|
||||
$query = $this->db->getQueryBuilder();
|
||||
$query->delete('calendar_invitation_tokens')
|
||||
$query->delete('calendar_invitations')
|
||||
->where($query->expr()->lt('expiration',
|
||||
$query->createNamedParameter($this->timeFactory->getTime())))
|
||||
->execute();
|
||||
|
|
|
@ -536,7 +536,7 @@ class IMipPlugin extends SabreIMipPlugin {
|
|||
$uid = $vevent->{'UID'};
|
||||
|
||||
$query = $this->db->getQueryBuilder();
|
||||
$query->insert('calendar_invitation_tokens')
|
||||
$query->insert('calendar_invitations')
|
||||
->values([
|
||||
'token' => $query->createNamedParameter($token),
|
||||
'attendee' => $query->createNamedParameter($attendee),
|
||||
|
|
|
@ -162,7 +162,7 @@ class InvitationResponseController extends Controller {
|
|||
private function getTokenInformation(string $token) {
|
||||
$query = $this->db->getQueryBuilder();
|
||||
$query->select('*')
|
||||
->from('calendar_invitation_tokens')
|
||||
->from('calendar_invitations')
|
||||
->where($query->expr()->eq('token', $query->createNamedParameter($token)));
|
||||
$stmt = $query->execute();
|
||||
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||
|
|
|
@ -22,8 +22,8 @@ class Version1006Date20180619154313 extends SimpleMigrationStep {
|
|||
/** @var ISchemaWrapper $schema */
|
||||
$schema = $schemaClosure();
|
||||
|
||||
if (!$schema->hasTable('calendar_invitation_tokens')) {
|
||||
$table = $schema->createTable('calendar_invitation_tokens');
|
||||
if (!$schema->hasTable('calendar_invitations')) {
|
||||
$table = $schema->createTable('calendar_invitations');
|
||||
|
||||
$table->addColumn('id', Type::BIGINT, [
|
||||
'autoincrement' => true,
|
||||
|
@ -62,8 +62,8 @@ class Version1006Date20180619154313 extends SimpleMigrationStep {
|
|||
'unsigned' => true,
|
||||
]);
|
||||
|
||||
$table->setPrimaryKey(['id'], 'calendar_invitation_tokens_id_idx');
|
||||
$table->addIndex(['token'], 'calendar_invitation_tokens_token_idx');
|
||||
$table->setPrimaryKey(['id']);
|
||||
$table->addIndex(['token'], 'calendar_invitation_tokens');
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ class CleanupInvitationTokenJobTest extends TestCase {
|
|||
|
||||
$queryBuilder->expects($this->at(0))
|
||||
->method('delete')
|
||||
->with('calendar_invitation_tokens')
|
||||
->with('calendar_invitations')
|
||||
->will($this->returnValue($queryBuilder));
|
||||
$queryBuilder->expects($this->at(3))
|
||||
->method('where')
|
||||
|
|
|
@ -96,7 +96,7 @@ class IMipPluginTest extends TestCase {
|
|||
->will($this->returnValue($queryBuilder));
|
||||
$queryBuilder->expects($this->at(0))
|
||||
->method('insert')
|
||||
->with('calendar_invitation_tokens')
|
||||
->with('calendar_invitations')
|
||||
->will($this->returnValue($queryBuilder));
|
||||
$queryBuilder->expects($this->at(8))
|
||||
->method('values')
|
||||
|
@ -176,7 +176,7 @@ class IMipPluginTest extends TestCase {
|
|||
->will($this->returnValue($queryBuilder));
|
||||
$queryBuilder->expects($this->at(0))
|
||||
->method('insert')
|
||||
->with('calendar_invitation_tokens')
|
||||
->with('calendar_invitations')
|
||||
->will($this->returnValue($queryBuilder));
|
||||
$queryBuilder->expects($this->at(8))
|
||||
->method('values')
|
||||
|
@ -264,7 +264,7 @@ class IMipPluginTest extends TestCase {
|
|||
->will($this->returnValue($queryBuilder));
|
||||
$queryBuilder->expects($this->at(0))
|
||||
->method('insert')
|
||||
->with('calendar_invitation_tokens')
|
||||
->with('calendar_invitations')
|
||||
->will($this->returnValue($queryBuilder));
|
||||
$queryBuilder->expects($this->at(8))
|
||||
->method('values')
|
||||
|
|
|
@ -438,7 +438,7 @@ EOF;
|
|||
->will($this->returnValue($queryBuilder));
|
||||
$queryBuilder->expects($this->at(1))
|
||||
->method('from')
|
||||
->with('calendar_invitation_tokens')
|
||||
->with('calendar_invitations')
|
||||
->will($this->returnValue($queryBuilder));
|
||||
$queryBuilder->expects($this->at(4))
|
||||
->method('where')
|
||||
|
|
Loading…
Reference in New Issue