diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2018-06-11 15:29:51 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2018-07-02 11:29:29 +0200 |
commit | 5d0d33a0d4a8cca80ba873140aeca0d3f96a3379 (patch) | |
tree | 1745535ed8b086ecb707a74175c806b2997282ed /apps/federatedfilesharing | |
parent | 34c4527cc44d312fa274aea26986aff748cc5442 (diff) | |
download | nextcloud-server-5d0d33a0d4a8cca80ba873140aeca0d3f96a3379.tar.gz nextcloud-server-5d0d33a0d4a8cca80ba873140aeca0d3f96a3379.zip |
remove unused method
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r-- | apps/federatedfilesharing/lib/Controller/RequestHandlerController.php | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php index eb434c30c91..e0d8299da40 100644 --- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php +++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php @@ -178,7 +178,7 @@ class RequestHandlerController extends OCSController { } catch (ProviderDoesNotExistsException $e) { throw new OCSException('Server does not support federated cloud sharing', 503); } catch (ProviderCouldNotAddShareException $e) { - throw new OCSException($e->getMessage(), $e->getCode()); + throw new OCSException($e->getMessage(), 400); } catch (\Exception $e) { throw new OCSException('internal server error, was not able to add share from ' . $remote, 500); } @@ -370,29 +370,6 @@ class RequestHandlerController extends OCSController { } /** - * get share - * - * @param int $id - * @param string $token - * @return array|bool - */ - protected function getShare($id, $token) { - $query = $this->connection->getQueryBuilder(); - $query->select('*')->from($this->shareTable) - ->where($query->expr()->eq('token', $query->createNamedParameter($token))) - ->andWhere($query->expr()->eq('share_type', $query->createNamedParameter(FederatedShareProvider::SHARE_TYPE_REMOTE))) - ->andWhere($query->expr()->eq('id', $query->createNamedParameter($id))); - - $result = $query->execute()->fetchAll(); - - if (!empty($result) && isset($result[0])) { - return $result[0]; - } - - return false; - } - - /** * check if server-to-server sharing is enabled * * @param bool $incoming |