diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-11-06 16:55:05 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-11-06 16:55:05 +0300 |
commit | 703a417ec9504105d661ee71c2e2950e3ab47bb2 (patch) | |
tree | 82e86869b4739b3150f79bf02546537c24b1fd3c /lib/AppInfo | |
parent | f8f80dce5cf6e40973dba61f8b4452f2616003f4 (diff) |
Cleanup, refactor and test new AvatarService
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/AppInfo')
-rw-r--r-- | lib/AppInfo/Application.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 343201925..3ef9e3d81 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -23,12 +23,13 @@ namespace OCA\Mail\AppInfo; use OCA\Mail\Contracts\IAttachmentService; +use OCA\Mail\Contracts\IAvatarService; use OCA\Mail\Contracts\IMailManager; use OCA\Mail\Contracts\IMailTransmission; use OCA\Mail\Service\Attachment\AttachmentService; +use OCA\Mail\Service\AvatarService; use OCA\Mail\Service\MailManager; use OCA\Mail\Service\MailTransmission; -use OCA\Mail\Storage\AvatarStorage; use OCP\AppFramework\App; use OCP\Util; @@ -46,6 +47,7 @@ class Application extends App { $transport = $container->getServer()->getConfig()->getSystemValue('app.mail.transport', 'smtp'); $testSmtp = $transport === 'smtp'; + $container->registerAlias(IAvatarService::class, AvatarService::class); $container->registerAlias(IMailManager::class, MailManager::class); $container->registerAlias(IAttachmentService::class, AttachmentService::class); $container->registerAlias(IMailTransmission::class, MailTransmission::class); @@ -62,9 +64,6 @@ class Application extends App { $container->registerParameter("testSmtp", $testSmtp); $container->registerParameter("referrer", isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null); $container->registerParameter("hostname", Util::getServerHostName()); - - $container->registerService('avatarStorage', function($c) { - return new AvatarStorage(); - }); } + } |