summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-06-11 15:29:51 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-02 11:29:29 +0200
commit5d0d33a0d4a8cca80ba873140aeca0d3f96a3379 (patch)
tree1745535ed8b086ecb707a74175c806b2997282ed /apps
parent34c4527cc44d312fa274aea26986aff748cc5442 (diff)
downloadnextcloud-server-5d0d33a0d4a8cca80ba873140aeca0d3f96a3379.tar.gz
nextcloud-server-5d0d33a0d4a8cca80ba873140aeca0d3f96a3379.zip
remove unused method
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/federatedfilesharing/lib/Controller/RequestHandlerController.php25
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