remove unused method
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
34c4527cc4
commit
5d0d33a0d4
1 changed files with 1 additions and 24 deletions
|
@ -178,7 +178,7 @@ class RequestHandlerController extends OCSController {
|
||||||
} catch (ProviderDoesNotExistsException $e) {
|
} catch (ProviderDoesNotExistsException $e) {
|
||||||
throw new OCSException('Server does not support federated cloud sharing', 503);
|
throw new OCSException('Server does not support federated cloud sharing', 503);
|
||||||
} catch (ProviderCouldNotAddShareException $e) {
|
} catch (ProviderCouldNotAddShareException $e) {
|
||||||
throw new OCSException($e->getMessage(), $e->getCode());
|
throw new OCSException($e->getMessage(), 400);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new OCSException('internal server error, was not able to add share from ' . $remote, 500);
|
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
|
* check if server-to-server sharing is enabled
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue