diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-03-03 12:52:27 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-03-11 16:37:42 +0100 |
commit | 1a0f9c375be12502d9b016c6bdb4c898ec765bbd (patch) | |
tree | 6b287f2d71e94740b364d17a5f23424d5f6668aa /core/application.php | |
parent | cfaee93552b519b8e017e63fd5a82b1e5c9f951b (diff) | |
download | nextcloud-server-1a0f9c375be12502d9b016c6bdb4c898ec765bbd.tar.gz nextcloud-server-1a0f9c375be12502d9b016c6bdb4c898ec765bbd.zip |
Avatar controller moved to AppFrameWork
* Original avatarcontroller migrated to the appframework
* Added DataDisplayResponse that show data inline in the browser (used
to retrun the image)
* Removed some unneeded code
* Added unit tests for the avatarcontroller
Diffstat (limited to 'core/application.php')
-rw-r--r-- | core/application.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/application.php b/core/application.php index c36ab559c27..568fc34db7d 100644 --- a/core/application.php +++ b/core/application.php @@ -14,6 +14,7 @@ use OC\AppFramework\Utility\SimpleContainer; use \OCP\AppFramework\App; use OC\Core\LostPassword\Controller\LostController; use OC\Core\User\UserController; +use OC\Core\Avatar\AvatarController; use \OCP\Util; /** @@ -56,6 +57,17 @@ class Application extends App { $c->query('Defaults') ); }); + $container->registerService('AvatarController', function(SimpleContainer $c) { + return new AvatarController( + $c->query('AppName'), + $c->query('Request'), + $c->query('AvatarManager'), + $c->query('Cache'), + $c->query('L10N'), + $c->query('UserManager'), + $c->query('UserSession') + ); + }); /** * Core class wrappers @@ -78,6 +90,17 @@ class Application extends App { $container->registerService('SecureRandom', function(SimpleContainer $c) { return $c->query('ServerContainer')->getSecureRandom(); }); + $container->registerService('AvatarManager', function(SimpleContainer $c) { + return $c->query('ServerContainer')->getAvatarManager(); + }); + $container->registerService('UserSession', function(SimpleContainer $c) { + return $c->query('ServerContainer')->getUserSession(); + }); + $container->registerService('Cache', function(SimpleContainer $c) { + return $c->query('ServerContainer')->getCache(); + }); + + $container->registerService('Defaults', function() { return new \OC_Defaults; }); |