Skip to content
Closed
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
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Service/FilesAppService.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function markAsDeleted(Attachment $attachment) {
*/
private function getShareForAttachment(Attachment $attachment): IShare {
try {
$share = $this->shareProvider->getShareById($attachment->getId());
$share = $this->shareProvider->getShareById((string)$attachment->getId());
} catch (ShareNotFound $e) {
throw new NoPermissionException('No permission to access the attachment from the card');
}
Expand Down
10 changes: 4 additions & 6 deletions lib/Sharing/DeckShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OCP\Share\IShare;
use Override;

/** Taken from the talk shareapicontroller helper */
interface IShareProviderBackend {
Expand Down Expand Up @@ -419,7 +420,7 @@ public function restore(IShare $share, string $recipient): IShare {

$qb->executeStatement();

return $this->getShareById((int)$share->getId(), $recipient);
return $this->getShareById($share->getId(), $recipient);
}

/**
Expand Down Expand Up @@ -567,11 +568,8 @@ public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offs
return $shares;
}

/**
* @inheritDoc
* @throws ShareNotFound
*/
public function getShareById($id, $recipientId = null) {
#[Override]
public function getShareById($id, $recipientId = null): IShare {
$qb = $this->dbConnection->getQueryBuilder();
$qb->select('s.*',
'f.fileid', 'f.path', 'f.permissions AS f_permissions', 'f.storage', 'f.path_hash',
Expand Down
Loading