summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php9
-rw-r--r--lib/private/Server.php10
-rw-r--r--lib/private/Share/Share.php2
-rw-r--r--lib/private/Share20/ProviderFactory.php2
-rw-r--r--lib/public/IServerContainer.php6
5 files changed, 3 insertions, 26 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 4b72c2c9e3e..4fb13b09ae0 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -56,8 +56,6 @@ use OCP\IL10N;
use OCP\IRequest;
use OCP\IServerContainer;
use OCP\IUserSession;
-use OCP\Files\Mount\IMountManager;
-use OCP\OCS\IDiscoveryService;
use OCP\RichObjectStrings\IValidator;
use OCP\Util;
@@ -139,13 +137,6 @@ class DIContainer extends SimpleContainer implements IAppContainer {
return $c;
});
- $this->registerService(IMountManager::class, function () {
- return $this->getServer()->getMountManager();
- });
- $this->registerService(IDiscoveryService::class, function($c) {
- return $this->getServer()->getOCSDiscoveryService();
- });
-
// commonly used attributes
$this->registerService('UserId', function ($c) {
return $c->query('OCP\\IUserSession')->getSession()->get('user_id');
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 13387ebd3ed..67075076801 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -937,7 +937,7 @@ class Server extends ServerContainer implements IServerContainer {
});
});
- $this->registerService('OCSDiscoveryService', function (Server $c) {
+ $this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) {
return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService());
});
@@ -1002,14 +1002,6 @@ class Server extends ServerContainer implements IServerContainer {
}
/**
- * @return \OC\OCS\DiscoveryService
- */
- public function getOCSDiscoveryService() {
- return $this->query('OCSDiscoveryService');
- }
-
-
- /**
* The current request object holding all information about the request
* currently being processed is returned from this method.
* In case the current execution was not initiated by a web request null is returned
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 2b4a57b89a4..b3e4cb2d4aa 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -2742,7 +2742,7 @@ class Share extends Constants {
'result' => '',
];
$try = 0;
- $discoveryService = \OC::$server->getOCSDiscoveryService();
+ $discoveryService = \OC::$server->query(\OCP\OCS\IDiscoveryService::class);
while ($result['success'] === false && $try < 2) {
$federationEndpoints = $discoveryService->discover($protocol . $remoteDomain, 'FEDERATED_SHARING');
$endpoint = isset($federationEndpoints['share']) ? $federationEndpoints['share'] : '/ocs/v2.php/cloud/shares';
diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php
index 5eb34a483e7..ba6699ae7ad 100644
--- a/lib/private/Share20/ProviderFactory.php
+++ b/lib/private/Share20/ProviderFactory.php
@@ -107,7 +107,7 @@ class ProviderFactory implements IProviderFactory {
$notifications = new Notifications(
$addressHandler,
$this->serverContainer->getHTTPClientService(),
- $this->serverContainer->getOCSDiscoveryService(),
+ $this->serverContainer->query(\OCP\OCS\IDiscoveryService::class),
$this->serverContainer->getJobList()
);
$tokenHandler = new TokenHandler(
diff --git a/lib/public/IServerContainer.php b/lib/public/IServerContainer.php
index 4d084aae79e..8c74c05d801 100644
--- a/lib/public/IServerContainer.php
+++ b/lib/public/IServerContainer.php
@@ -531,10 +531,4 @@ interface IServerContainer extends IContainer {
* @since 12.0.0
*/
public function getCloudIdManager();
-
- /**
- * @return \OC\OCS\DiscoveryService
- * @since 12.0.0
- */
- public function getOCSDiscoveryService();
}