mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Make sure we have existing indexes before using them
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
1f48a83b09
commit
07553f0c62
1 changed files with 4 additions and 2 deletions
|
|
@ -1776,7 +1776,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
|||
$calendarAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendartype', $calendarObjectIdQuery->createNamedParameter(self::CALENDAR_TYPE_CALENDAR)));
|
||||
|
||||
// If it's shared, limit search to public events
|
||||
if ($calendar['principaluri'] !== $calendar['{http://owncloud.org/ns}owner-principal']) {
|
||||
if (isset($calendar['{http://owncloud.org/ns}owner-principal'])
|
||||
&& $calendar['principaluri'] !== $calendar['{http://owncloud.org/ns}owner-principal']) {
|
||||
$calendarAnd->add($calendarObjectIdQuery->expr()->eq('co.classification', $calendarObjectIdQuery->createNamedParameter(self::CLASSIFICATION_PUBLIC)));
|
||||
}
|
||||
|
||||
|
|
@ -1788,7 +1789,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
|||
$subscriptionAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendartype', $calendarObjectIdQuery->createNamedParameter(self::CALENDAR_TYPE_SUBSCRIPTION)));
|
||||
|
||||
// If it's shared, limit search to public events
|
||||
if ($subscription['principaluri'] !== $subscription['{http://owncloud.org/ns}owner-principal']) {
|
||||
if (isset($subscription['{http://owncloud.org/ns}owner-principal'])
|
||||
&& $subscription['principaluri'] !== $subscription['{http://owncloud.org/ns}owner-principal']) {
|
||||
$subscriptionAnd->add($calendarObjectIdQuery->expr()->eq('co.classification', $calendarObjectIdQuery->createNamedParameter(self::CLASSIFICATION_PUBLIC)));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue