Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authortobiasKaminsky <tobias@kaminsky.me>2022-09-19 12:11:09 +0300
committertobiasKaminsky <tobias@kaminsky.me>2022-09-19 12:11:09 +0300
commit4a4a3874da17105bad1eeba80e8b2e6c7ba4eb6c (patch)
treeb90ed40788ea6efeb14049989449b7b33d9bf220 /apps
parent3950deb42fa9c7c5805e5047d07c988d59e57eb9 (diff)
Add includeTags to /share/id
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 003d9336af5..068b9d12486 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -366,10 +366,11 @@ class ShareAPIController extends OCSController {
* @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) {
@@ -379,6 +380,11 @@ class ShareAPIController extends OCSController {
try {
if ($this->canAccessShare($share)) {
$share = $this->formatShare($share);
+
+ if ($includeTags) {
+ $share = Helper::populateTags($formatted, 'file_source', \OC::$server->getTagManager());
+ }
+
return new DataResponse([$share]);
}
} catch (NotFoundException $e) {