Skip to content
Merged
Changes from 2 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
8 changes: 7 additions & 1 deletion apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,11 @@ private function getDisplayNameFromAddressBook(string $query, string $property):
* @NoAdminRequired
*
* @param string $id
* @param bool $includeTags
* @return DataResponse
* @throws OCSNotFoundException
*/
public function getShare(string $id): DataResponse {
public function getShare(string $id, bool $includeTags = false): DataResponse {
try {
$share = $this->getShareById($id);
} catch (ShareNotFound $e) {
Expand All @@ -379,6 +380,11 @@ public function getShare(string $id): DataResponse {
try {
if ($this->canAccessShare($share)) {
$share = $this->formatShare($share);

if ($includeTags) {
$share = Helper::populateTags(array($share), 'file_source', \OC::$server->getTagManager());
}

return new DataResponse([$share]);
}
} catch (NotFoundException $e) {
Expand Down