summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-04-05 22:35:59 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-11 15:04:01 +0200
commit53bca14a27538e457f69fbbdf5aeae2eb3194706 (patch)
treeacdddd5a0519a6b839018c7a02025a86807e563c /apps
parent3bc72f7224b6698c13d66c102e55e65467105c94 (diff)
downloadnextcloud-server-53bca14a27538e457f69fbbdf5aeae2eb3194706.tar.gz
nextcloud-server-53bca14a27538e457f69fbbdf5aeae2eb3194706.zip
Do proper DI
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/federatedfilesharing/lib/AppInfo/Application.php4
-rw-r--r--apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php2
-rw-r--r--apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php2
-rw-r--r--apps/federatedfilesharing/lib/Controller/RequestHandlerController.php2
-rw-r--r--apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php2
-rw-r--r--apps/federation/lib/AppInfo/Application.php2
-rw-r--r--apps/federation/lib/BackgroundJob/GetSharedSecret.php2
-rw-r--r--apps/federation/lib/BackgroundJob/RequestSharedSecret.php2
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php2
-rw-r--r--apps/files_sharing/lib/External/Storage.php2
-rw-r--r--apps/files_sharing/lib/Hooks.php2
-rw-r--r--apps/files_sharing/tests/External/ManagerTest.php2
12 files changed, 13 insertions, 13 deletions
diff --git a/apps/federatedfilesharing/lib/AppInfo/Application.php b/apps/federatedfilesharing/lib/AppInfo/Application.php
index daeb049a31e..9d8464e37d5 100644
--- a/apps/federatedfilesharing/lib/AppInfo/Application.php
+++ b/apps/federatedfilesharing/lib/AppInfo/Application.php
@@ -51,7 +51,7 @@ class Application extends App {
$notification = new Notifications(
$addressHandler,
$server->getHTTPClientService(),
- $server->getOCSDiscoveryService(),
+ $server->query(\OCP\OCS\IDiscoveryService::class),
\OC::$server->getJobList()
);
return new RequestHandlerController(
@@ -99,7 +99,7 @@ class Application extends App {
$notifications = new \OCA\FederatedFileSharing\Notifications(
$addressHandler,
\OC::$server->getHTTPClientService(),
- \OC::$server->getOCSDiscoveryService(),
+ \OC::$server->query(\OCP\OCS\IDiscoveryService::class),
\OC::$server->getJobList()
);
$tokenHandler = new \OCA\FederatedFileSharing\TokenHandler(
diff --git a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php
index 8d81d56802d..821647e5e39 100644
--- a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php
+++ b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php
@@ -70,7 +70,7 @@ class RetryJob extends Job {
$this->notifications = new Notifications(
$addressHandler,
\OC::$server->getHTTPClientService(),
- \OC::$server->getOCSDiscoveryService(),
+ \OC::$server->query(\OCP\OCS\IDiscoveryService::class),
\OC::$server->getJobList()
);
}
diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php
index d20018f38a3..d7e466d1a64 100644
--- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php
+++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php
@@ -254,7 +254,7 @@ class MountPublicLinkController extends Controller {
Filesystem::getLoader(),
\OC::$server->getHTTPClientService(),
\OC::$server->getNotificationManager(),
- \OC::$server->getOCSDiscoveryService(),
+ \OC::$server->query(\OCP\OCS\IDiscoveryService::class),
\OC::$server->getUserSession()->getUser()->getUID()
);
diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
index fa212680225..2b643810fb4 100644
--- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
+++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
@@ -158,7 +158,7 @@ class RequestHandlerController extends OCSController {
\OC\Files\Filesystem::getLoader(),
\OC::$server->getHTTPClientService(),
\OC::$server->getNotificationManager(),
- \OC::$server->getOCSDiscoveryService(),
+ \OC::$server->query(\OCP\OCS\IDiscoveryService::class),
$shareWith
);
diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
index c695fb140e5..512000181c1 100644
--- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
@@ -276,7 +276,7 @@ class RequestHandlerControllerTest extends TestCase {
Filesystem::getLoader(),
$httpClientService,
\OC::$server->getNotificationManager(),
- \OC::$server->getOCSDiscoveryService(),
+ \OC::$server->query(\OCP\OCS\IDiscoveryService::class),
$toDelete
);
diff --git a/apps/federation/lib/AppInfo/Application.php b/apps/federation/lib/AppInfo/Application.php
index e76a8f850c8..3166316b108 100644
--- a/apps/federation/lib/AppInfo/Application.php
+++ b/apps/federation/lib/AppInfo/Application.php
@@ -135,7 +135,7 @@ class Application extends \OCP\AppFramework\App {
public function getSyncService() {
$syncService = \OC::$server->query('CardDAVSyncService');
$dbHandler = $this->getContainer()->query('DbHandler');
- $discoveryService = \OC::$server->getOCSDiscoveryService();
+ $discoveryService = \OC::$server->query(\OCP\OCS\IDiscoveryService::class);
return new SyncFederationAddressBooks($dbHandler, $syncService, $discoveryService);
}
diff --git a/apps/federation/lib/BackgroundJob/GetSharedSecret.php b/apps/federation/lib/BackgroundJob/GetSharedSecret.php
index 82622978908..b25c51afd0e 100644
--- a/apps/federation/lib/BackgroundJob/GetSharedSecret.php
+++ b/apps/federation/lib/BackgroundJob/GetSharedSecret.php
@@ -101,7 +101,7 @@ class GetSharedSecret extends Job{
$this->jobList = $jobList ? $jobList : \OC::$server->getJobList();
$this->urlGenerator = $urlGenerator ? $urlGenerator : \OC::$server->getURLGenerator();
$this->dbHandler = $dbHandler ? $dbHandler : new DbHandler(\OC::$server->getDatabaseConnection(), \OC::$server->getL10N('federation'));
- $this->ocsDiscoveryService = $ocsDiscoveryService ? $ocsDiscoveryService : \OC::$server->getOCSDiscoveryService();
+ $this->ocsDiscoveryService = $ocsDiscoveryService ? $ocsDiscoveryService : \OC::$server->query(\OCP\OCS\IDiscoveryService::class);
if ($trustedServers) {
$this->trustedServers = $trustedServers;
} else {
diff --git a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
index 6687b080bb0..1587a3b16e9 100644
--- a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
+++ b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
@@ -99,7 +99,7 @@ class RequestSharedSecret extends Job {
$this->urlGenerator = $urlGenerator ? $urlGenerator : \OC::$server->getURLGenerator();
$this->dbHandler = $dbHandler ? $dbHandler : new DbHandler(\OC::$server->getDatabaseConnection(), \OC::$server->getL10N('federation'));
$this->logger = \OC::$server->getLogger();
- $this->ocsDiscoveryService = $ocsDiscoveryService ? $ocsDiscoveryService : \OC::$server->getOCSDiscoveryService();
+ $this->ocsDiscoveryService = $ocsDiscoveryService ? $ocsDiscoveryService : \OC::$server->query(\OCP\OCS\IDiscoveryService::class);
if ($trustedServers) {
$this->trustedServers = $trustedServers;
} else {
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index d4e83ce5d6b..f502d905fe8 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -98,7 +98,7 @@ class Application extends App {
\OC\Files\Filesystem::getLoader(),
$server->getHTTPClientService(),
$server->getNotificationManager(),
- $server->getOCSDiscoveryService(),
+ $server->query(\OCP\OCS\IDiscoveryService::class),
$uid
);
});
diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php
index 7e0f1fd0b75..12ee3265c2a 100644
--- a/apps/files_sharing/lib/External/Storage.php
+++ b/apps/files_sharing/lib/External/Storage.php
@@ -65,7 +65,7 @@ class Storage extends DAV implements ISharedStorage {
$this->manager = $options['manager'];
$this->cloudId = $options['cloudId'];
- $discoveryService = \OC::$server->getOCSDiscoveryService();
+ $discoveryService = \OC::$server->query(\OCP\OCS\IDiscoveryService::class);
list($protocol, $remote) = explode('://', $this->cloudId->getRemote());
if (strpos($remote, '/')) {
diff --git a/apps/files_sharing/lib/Hooks.php b/apps/files_sharing/lib/Hooks.php
index 8c5fc6a8d6a..821c3046595 100644
--- a/apps/files_sharing/lib/Hooks.php
+++ b/apps/files_sharing/lib/Hooks.php
@@ -38,7 +38,7 @@ class Hooks {
\OC\Files\Filesystem::getLoader(),
\OC::$server->getHTTPClientService(),
\OC::$server->getNotificationManager(),
- \OC::$server->getOCSDiscoveryService(),
+ \OC::$server->query(\OCP\OCS\IDiscoveryService::class),
$params['uid']);
$manager->removeUserShares($params['uid']);
diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php
index efe4065e383..9f60261c203 100644
--- a/apps/files_sharing/tests/External/ManagerTest.php
+++ b/apps/files_sharing/tests/External/ManagerTest.php
@@ -77,7 +77,7 @@ class ManagerTest extends TestCase {
new StorageFactory(),
$this->clientService,
\OC::$server->getNotificationManager(),
- \OC::$server->getOCSDiscoveryService(),
+ \OC::$server->query(\OCP\OCS\IDiscoveryService::class),
$this->uid
);
$this->testMountProvider = new MountProvider(\OC::$server->getDatabaseConnection(), function() {