Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable29] fix: (CalDav) Delete invitation link when deleting Calendars or Events #49428

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Nov 21, 2024

Backport of PR #47832

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@backportbot backportbot bot requested a review from ChristophWurst November 21, 2024 14:32
@backportbot backportbot bot added bug 3. to review Waiting for reviews feature: caldav Related to CalDAV internals labels Nov 21, 2024
@backportbot backportbot bot added this to the Nextcloud 29.0.10 milestone Nov 21, 2024
// delete all links that match object uid's
$cmd = $this->db->getQueryBuilder();
$cmd->delete($this->dbObjectInvitationsTable)
->where($cmd->expr()->in('uid', $cmd->createNamedParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought one had to use \OCP\DB\QueryBuilder\IQueryBuilder::createParameter for a parameter, and createNamedParameter was to set a value directly.

Fine by me if the current code works

// delete all links that match object uid's
$cmd = $this->db->getQueryBuilder();
$cmd->delete($this->dbObjectInvitationsTable)
->where($cmd->expr()->in('uid', $cmd->createNamedParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be createParameter() instead. I'm 99% sure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #49454

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I step through tested this, it executes without any errors, but does not actual do what its supposed to do.

@st3iny st3iny merged commit 3687966 into stable29 Nov 23, 2024
181 checks passed
@st3iny st3iny deleted the backport/47832/stable29 branch November 23, 2024 15:58
@skjnldsv skjnldsv mentioned this pull request Nov 27, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug feature: caldav Related to CalDAV internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants