diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-03-10 15:37:21 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-11 15:04:01 +0200 |
commit | 449011dae7ea0ec7eb8d6c78e89709982020e709 (patch) | |
tree | e102862917001ace40e23d7126973612cf7f2ac6 /lib/private/Share | |
parent | 0dea31d48bbd0361cca4d67b9de05a9f9ad3a198 (diff) | |
download | nextcloud-server-449011dae7ea0ec7eb8d6c78e89709982020e709.tar.gz nextcloud-server-449011dae7ea0ec7eb8d6c78e89709982020e709.zip |
remove discovery manager in favour of the OCSDiscoveryService
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib/private/Share')
-rw-r--r-- | lib/private/Share/Share.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php index 924e2f68396..2b4a57b89a4 100644 --- a/lib/private/Share/Share.php +++ b/lib/private/Share/Share.php @@ -2742,12 +2742,10 @@ class Share extends Constants { 'result' => '', ]; $try = 0; - $discoveryManager = new DiscoveryManager( - \OC::$server->getMemCacheFactory(), - \OC::$server->getHTTPClientService() - ); + $discoveryService = \OC::$server->getOCSDiscoveryService(); while ($result['success'] === false && $try < 2) { - $endpoint = $discoveryManager->getShareEndpoint($protocol . $remoteDomain); + $federationEndpoints = $discoveryService->discover($protocol . $remoteDomain, 'FEDERATED_SHARING'); + $endpoint = isset($federationEndpoints['share']) ? $federationEndpoints['share'] : '/ocs/v2.php/cloud/shares'; $result = \OC::$server->getHTTPHelper()->post($protocol . $remoteDomain . $endpoint . $urlSuffix . '?format=' . self::RESPONSE_FORMAT, $fields); $try++; $protocol = 'http://'; |