summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/hooks/hooks.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/hooks/hooks.php')
-rw-r--r--apps/files_encryption/hooks/hooks.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 7698b95cfd3..e39e068cc5d 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -38,11 +38,15 @@ class Hooks {
* @note This method should never be called for users using client side encryption
*/
public static function login($params) {
-
- // Manually initialise Filesystem{} singleton with correct
- // fake root path, in order to avoid fatal webdav errors
- // NOTE: disabled because this give errors on webdav!
- //\OC\Files\Filesystem::init( $params['uid'], '/' . 'files' . '/' );
+ $l = new \OC_L10N('files_encryption');
+ //check if openssl is available
+ if(!extension_loaded("openssl") ) {
+ $error_msg = $l->t("PHP module OpenSSL is not installed.");
+ $hint = $l->t('Please ask your server administrator to install the module. For now the encryption app was disabled.');
+ \OC_App::disable('files_encryption');
+ \OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR);
+ \OCP\Template::printErrorPage($error_msg, $hint);
+ }
$view = new \OC_FilesystemView('/');