Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Check for no longer existing calendars
Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed Jan 11, 2019
commit 12e24ed6e706e78190ebea1d95a7927f097003e0
8 changes: 8 additions & 0 deletions apps/dav/lib/Migration/RemoveClassifiedEventActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ protected function removePrivateEventActivity(): int {
$result = $query->execute();

while ($row = $result->fetch()) {
if ($row['principaluri'] === null) {
continue;
Copy link
Member

Choose a reason for hiding this comment

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

Actually we should delete those right away. But I will add a new repair step to check this.

Copy link
Member

Choose a reason for hiding this comment

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

Why wasn't this added to the SQL statement? 😉

}

$delete->setParameter('owner', $this->getPrincipal($row['principaluri']))
->setParameter('type', 'calendar')
->setParameter('calendar_id', $row['calendarid'])
Expand Down Expand Up @@ -105,6 +109,10 @@ protected function removeConfidentialUncensoredEventActivity(): int {
$result = $query->execute();

while ($row = $result->fetch()) {
if ($row['principaluri'] === null) {
continue;
}

$delete->setParameter('owner', $this->getPrincipal($row['principaluri']))
->setParameter('type', 'calendar')
->setParameter('calendar_id', $row['calendarid'])
Expand Down