Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions apps/dav/lib/CardDAV/HasPhotoPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace OCA\DAV\CardDAV;

use Sabre\CardDAV\Card;
use Sabre\CardDAV\ICard;
use Sabre\DAV\INode;
use Sabre\DAV\PropFind;
use Sabre\DAV\Server;
Expand Down Expand Up @@ -43,7 +43,7 @@ public function initialize(Server $server) {
public function propFind(PropFind $propFind, INode $node) {
$ns = '{http://nextcloud.com/ns}';

if ($node instanceof Card) {
if ($node instanceof ICard) {
$propFind->handle($ns . 'has-photo', function () use ($node) {
$vcard = Reader::read($node->get());
return $vcard instanceof VCard
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/lib/CardDAV/ImageExportPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use OCP\AppFramework\Http;
use OCP\Files\NotFoundException;
use Sabre\CardDAV\Card;
use Sabre\CardDAV\ICard;
use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
use Sabre\HTTP\RequestInterface;
Expand Down Expand Up @@ -64,7 +64,7 @@ public function httpGet(RequestInterface $request, ResponseInterface $response)
$path = $request->getPath();
$node = $this->server->tree->getNodeForPath($path);

if (!$node instanceof Card) {
if (!$node instanceof ICard) {
return true;
}

Expand Down
10 changes: 5 additions & 5 deletions apps/dav/lib/CardDAV/PhotoCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\Image;
use Psr\Log\LoggerInterface;
use Sabre\CardDAV\Card;
use Sabre\CardDAV\ICard;
use Sabre\VObject\Document;
use Sabre\VObject\Parameter;
use Sabre\VObject\Property\Binary;
Expand Down Expand Up @@ -43,7 +43,7 @@ public function __construct(
/**
* @throws NotFoundException
*/
public function get(int $addressBookId, string $cardUri, int $size, Card $card): ISimpleFile {
public function get(int $addressBookId, string $cardUri, int $size, ICard $card): ISimpleFile {
$folder = $this->getFolder($addressBookId, $cardUri);

if ($this->isEmpty($folder)) {
Expand All @@ -68,7 +68,7 @@ private function isEmpty(ISimpleFolder $folder): bool {
/**
* @throws NotPermittedException
*/
private function init(ISimpleFolder $folder, Card $card): void {
private function init(ISimpleFolder $folder, ICard $card): void {
$data = $this->getPhoto($card);

if ($data === false || !isset($data['Content-Type'])) {
Expand Down Expand Up @@ -168,10 +168,10 @@ private function getExtension(ISimpleFolder $folder): string {
}

/**
* @param Card $node
* @param ICard $node
* @return false|array{body: string, Content-Type: string}
*/
private function getPhoto(Card $node) {
private function getPhoto(ICard $node) {
try {
$vObject = $this->readCard($node->get());
return $this->getPhotoFromVObject($vObject);
Expand Down
Loading