summaryrefslogtreecommitdiffstats
path: root/settings/application.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-03-26 14:51:33 +0100
committerLukas Reschke <lukas@owncloud.com>2015-03-28 13:59:22 +0100
commit65202d2a18aca3b253ce5f3c7c9af17ee6d12e52 (patch)
tree04453d95db5dc3df386188cd85032052fded6db9 /settings/application.php
parentd3752ca1e925c3aed46c13f7ea26c8f540db05e0 (diff)
downloadnextcloud-server-65202d2a18aca3b253ce5f3c7c9af17ee6d12e52.tar.gz
nextcloud-server-65202d2a18aca3b253ce5f3c7c9af17ee6d12e52.zip
Add check for activated local memcache
Also used the opportunity to refactor it into an AppFramework controller so that we can unit test it. Fixes https://github.com/owncloud/core/issues/14956
Diffstat (limited to 'settings/application.php')
-rw-r--r--settings/application.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/settings/application.php b/settings/application.php
index 397e3b3de91..b4596037964 100644
--- a/settings/application.php
+++ b/settings/application.php
@@ -24,6 +24,7 @@
namespace OC\Settings;
use OC\Settings\Controller\AppSettingsController;
+use OC\Settings\Controller\CheckSetupController;
use OC\Settings\Controller\GroupsController;
use OC\Settings\Controller\LogSettingsController;
use OC\Settings\Controller\MailSettingsController;
@@ -44,7 +45,7 @@ class Application extends App {
/**
* @param array $urlParams
*/
- public function __construct(array $urlParams=array()){
+ public function __construct(array $urlParams=[]){
parent::__construct('settings', $urlParams);
$container = $this->getContainer();
@@ -117,6 +118,15 @@ class Application extends App {
$c->query('L10N')
);
});
+ $container->registerService('CheckSetupController', function(IContainer $c) {
+ return new CheckSetupController(
+ $c->query('AppName'),
+ $c->query('Request'),
+ $c->query('Config'),
+ $c->query('ClientService'),
+ $c->query('Util')
+ );
+ });
/**
* Middleware
@@ -178,5 +188,11 @@ class Application extends App {
$container->registerService('URLGenerator', function(IContainer $c) {
return $c->query('ServerContainer')->getURLGenerator();
});
+ $container->registerService('ClientService', function(IContainer $c) {
+ return $c->query('ServerContainer')->getHTTPClientService();
+ });
+ $container->registerService('Util', function(IContainer $c) {
+ return new \OC_Util();
+ });
}
}