diff options
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index bc525b6ef82..bd57d80dab0 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -23,6 +23,7 @@ */ namespace OCA\Files_Sharing\Controller; +use OCA\Files\Helper; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSBadRequestException; use OCP\AppFramework\OCS\OCSException; @@ -484,9 +485,10 @@ class ShareAPIController extends OCSController { /** * @param \OCP\Files\File|\OCP\Files\Folder $node + * @param boolean $includeTags * @return DataResponse */ - private function getSharedWithMe($node = null) { + private function getSharedWithMe($node = null, $includeTags) { $userShares = $this->shareManager->getSharedWith($this->currentUser, \OCP\Share::SHARE_TYPE_USER, $node, -1, 0); $groupShares = $this->shareManager->getSharedWith($this->currentUser, \OCP\Share::SHARE_TYPE_GROUP, $node, -1, 0); @@ -509,6 +511,10 @@ class ShareAPIController extends OCSController { } } + if ($includeTags) { + $formatted = Helper::populateTags($formatted, 'file_source'); + } + return new DataResponse($formatted); } @@ -572,7 +578,8 @@ class ShareAPIController extends OCSController { $shared_with_me = 'false', $reshares = 'false', $subfiles = 'false', - $path = null + $path = null, + $include_tags = 'false' ) { if ($path !== null) { @@ -588,7 +595,7 @@ class ShareAPIController extends OCSController { } if ($shared_with_me === 'true') { - $result = $this->getSharedWithMe($path); + $result = $this->getSharedWithMe($path, $include_tags); return $result; } @@ -634,6 +641,10 @@ class ShareAPIController extends OCSController { } } + if ($include_tags) { + $formatted = Helper::populateTags($formatted, 'file_source'); + } + return new DataResponse($formatted); } |