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

fix(carddav): don't read after write for address book creation #42102

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
26 changes: 26 additions & 0 deletions apps/dav/lib/BackgroundJob/CalendarStatusAutomation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/*
* *
* * {$app} App
* *
* * @copyright 2022 Anna Larch <anna.larch@gmx.net>
miaulalala marked this conversation as resolved.
Show resolved Hide resolved
* *
* * @author Anna Larch <anna.larch@gmx.net>
* *
* * This library is free software; you can redistribute it and/or
* * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* * License as published by the Free Software Foundation; either
* * version 3 of the License, or any later version.
* *
* * This library is distributed in the hope that it will be useful,
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
* *
* * You should have received a copy of the GNU Affero General Public
* * License along with this library. If not, see <http://www.gnu.org/licenses/>.
* *
*
*/


13 changes: 12 additions & 1 deletion apps/dav/lib/CardDAV/CardDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,20 @@ public function createAddressBook($principalUri, $url, array $properties) {
->execute();

$addressBookId = $query->getLastInsertId();
$addressBook = [
'id' => $addressBookId,
'uri' => $values['uri'],
'principaluri' => $values['principaluri'],
'{DAV:}displayname' => $values['displayname'],
'{' . Plugin::NS_CARDDAV . '}addressbook-description' => $values['description'],
'{http://calendarserver.org/ns/}getctag' => 0,
'{http://sabredav.org/ns}sync-token' => '0',
];
$this->addOwnerPrincipal($addressBook);

return [
$addressBookId,
$this->getAddressBookById($addressBookId),
$addressBook
];
}, $this->db);

Expand Down
Loading