diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-09-26 09:55:59 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-10-02 07:40:04 +0200 |
commit | 7310c4166ab3f5f441a29af6e4c74b9222b13df7 (patch) | |
tree | b0b3bd8399286c8bf4124cd386a2c069aca85b72 /apps/files_sharing/lib | |
parent | 4a620211412f9cf1b2fc9af8fd9edfbb73eb76ae (diff) | |
download | nextcloud-server-7310c4166ab3f5f441a29af6e4c74b9222b13df7.tar.gz nextcloud-server-7310c4166ab3f5f441a29af6e4c74b9222b13df7.zip |
Added '../remote_shares' endpoint
* list incoming remote shares at 'remote_shares'
* get per share info at 'remote_shares/<ID>'
* delete remote share with a DELETE to 'remote_shares/<ID>'
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/external/manager.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/external/manager.php index 8552b2fbd34..78d9581524d 100644 --- a/apps/files_sharing/lib/external/manager.php +++ b/apps/files_sharing/lib/external/manager.php @@ -180,9 +180,9 @@ class Manager { * @param int $id share id * @return mixed share of false */ - private function getShare($id) { + public function getShare($id) { $getShare = $this->connection->prepare(' - SELECT `remote`, `remote_id`, `share_token`, `name` + SELECT * FROM `*PREFIX*share_external` WHERE `id` = ? AND `user` = ?'); $result = $getShare->execute(array($id, $this->uid)); @@ -407,6 +407,15 @@ class Manager { } /** + * return a list of shares wich are accepted by the user + * + * @return array list of accepted server-to-server shares + */ + public function getAcceptedShares() { + return $this->getShares(true); + } + + /** * return a list of shares for the user * * @param bool|null $accepted True for accepted only, |