summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-07-22 13:04:56 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-08-10 10:45:16 +0200
commitf0b617b50825566ec1b417eed09688e88de5f0bb (patch)
treed7d009ba3d197dd78ff16e83543bba991dbe250f /apps
parentc80c9819dcc1a4c79b5c2621a3ec07623e1cd140 (diff)
downloadnextcloud-server-f0b617b50825566ec1b417eed09688e88de5f0bb.tar.gz
nextcloud-server-f0b617b50825566ec1b417eed09688e88de5f0bb.zip
Use DI
* Register OCP\Capability\IManager at DIContainer * Add register capabilities to appframework * Register capabilities in DI way * Make unit test pass again * Remove CapabiltiesManager from OCP
Diffstat (limited to 'apps')
-rw-r--r--apps/files/appinfo/application.php5
-rw-r--r--apps/files_sharing/appinfo/application.php6
-rw-r--r--apps/files_trashbin/appinfo/application.php5
-rw-r--r--apps/files_versions/appinfo/application.php5
4 files changed, 4 insertions, 17 deletions
diff --git a/apps/files/appinfo/application.php b/apps/files/appinfo/application.php
index f121eb7a401..6ba77e09556 100644
--- a/apps/files/appinfo/application.php
+++ b/apps/files/appinfo/application.php
@@ -26,7 +26,6 @@ use OCA\Files\Controller\ApiController;
use OCP\AppFramework\App;
use \OCA\Files\Service\TagService;
use \OCP\IContainer;
-use OCA\Files\Capabilities;
class Application extends App {
public function __construct(array $urlParams=array()) {
@@ -71,8 +70,6 @@ class Application extends App {
/*
* Register capabilities
*/
- $server->getCapabilitiesManager()->registerCapability(function() {
- return new Capabilities();
- });
+ $container->registerCapability('OCA\Files\Capabilities');
}
}
diff --git a/apps/files_sharing/appinfo/application.php b/apps/files_sharing/appinfo/application.php
index 6ddd25acb52..2fe9019d54e 100644
--- a/apps/files_sharing/appinfo/application.php
+++ b/apps/files_sharing/appinfo/application.php
@@ -128,11 +128,7 @@ class Application extends App {
/*
* Register capabilities
*/
- $server->getCapabilitiesManager()->registerCapability(function() use ($server) {
- return new Capabilities(
- $server->getConfig()
- );
- });
+ $container->registerCapability('OCA\Files_Sharing\Capabilities');
}
public function registerMountProviders() {
diff --git a/apps/files_trashbin/appinfo/application.php b/apps/files_trashbin/appinfo/application.php
index 851de142e5c..8d76d40f639 100644
--- a/apps/files_trashbin/appinfo/application.php
+++ b/apps/files_trashbin/appinfo/application.php
@@ -22,7 +22,6 @@
namespace OCA\Files_Trashbin\AppInfo;
use OCP\AppFramework\App;
-use OCA\Files_Trashbin\Capabilities;
class Application extends App {
public function __construct(array $urlParams = array()) {
@@ -33,8 +32,6 @@ class Application extends App {
/*
* Register capabilities
*/
- $server->getCapabilitiesManager()->registerCapability(function() {
- return new Capabilities();
- });
+ $container->registerCapability('OCA\Files_Trashbin\Capabilities');
}
}
diff --git a/apps/files_versions/appinfo/application.php b/apps/files_versions/appinfo/application.php
index 69485bc1f22..bab36b48510 100644
--- a/apps/files_versions/appinfo/application.php
+++ b/apps/files_versions/appinfo/application.php
@@ -22,7 +22,6 @@
namespace OCA\Files_Versions\AppInfo;
use OCP\AppFramework\App;
-use OCA\Files_Versions\Capabilities;
class Application extends App {
public function __construct(array $urlParams = array()) {
@@ -33,8 +32,6 @@ class Application extends App {
/*
* Register capabilities
*/
- $server->getCapabilitiesManager()->registerCapability(function() {
- return new Capabilities();
- });
+ $container->registerCapability('OCA\Files_Versions\Capabilities');
}
}