diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/encryption/appinfo/application.php | 18 | ||||
-rw-r--r-- | apps/encryption/lib/crypto/encryption.php | 3 |
2 files changed, 13 insertions, 8 deletions
diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php index dbeb1171bd8..5d0fe2c9184 100644 --- a/apps/encryption/appinfo/application.php +++ b/apps/encryption/appinfo/application.php @@ -27,6 +27,7 @@ namespace OCA\Encryption\AppInfo; use OC\Files\Filesystem; use OC\Files\View; use OCA\Encryption\Crypto\Crypt; +use OCA\Encryption\Crypto\Encryption; use OCA\Encryption\HookManager; use OCA\Encryption\Hooks\UserHooks; use OCA\Encryption\KeyManager; @@ -90,14 +91,17 @@ class Application extends \OCP\AppFramework\App { public function registerEncryptionModule() { $container = $this->getContainer(); - $container->registerService('EncryptionModule', function (IAppContainer $c) { - return new \OCA\Encryption\Crypto\Encryption( - $c->query('Crypt'), - $c->query('KeyManager'), - $c->query('Util')); + + $this->encryptionManager->registerEncryptionModule( + Encryption::ID, + Encryption::DISPLAY_NAME, + function() use ($container) { + return new Encryption( + $container->query('Crypt'), + $container->query('KeyManager'), + $container->query('Util') + ); }); - $module = $container->query('EncryptionModule'); - $this->encryptionManager->registerEncryptionModule($module); } public function registerServices() { diff --git a/apps/encryption/lib/crypto/encryption.php b/apps/encryption/lib/crypto/encryption.php index fd5a84c9734..8498b4223e1 100644 --- a/apps/encryption/lib/crypto/encryption.php +++ b/apps/encryption/lib/crypto/encryption.php @@ -32,6 +32,7 @@ use OCA\Encryption\KeyManager; class Encryption implements IEncryptionModule { const ID = 'OC_DEFAULT_MODULE'; + const DISPLAY_NAME = 'ownCloud Default Encryption'; /** * @var Crypt @@ -90,7 +91,7 @@ class Encryption implements IEncryptionModule { * @return string */ public function getDisplayName() { - return 'ownCloud Default Encryption'; + return self::DISPLAY_NAME; } /** |