remove unused method

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Bjoern Schiessle 2018-06-11 15:29:51 +02:00
parent 34c4527cc4
commit 5d0d33a0d4
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
1 changed files with 1 additions and 24 deletions

View File

@ -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);
}
@ -369,29 +369,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
*