summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/hooks
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-21 10:37:51 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-06-21 10:37:51 +0200
commitd10ad0d603d0755f0e57e92ecbce447a8944dc3a (patch)
tree462f1c8c8248670bedb24d5f5b8bfb7bd610e9b2 /apps/files_encryption/hooks
parent8c923a85dee0af07960c05902b187a0e7cbca34e (diff)
downloadnextcloud-server-d10ad0d603d0755f0e57e92ecbce447a8944dc3a.tar.gz
nextcloud-server-d10ad0d603d0755f0e57e92ecbce447a8944dc3a.zip
Squashed commit of the following:
commit 1345201c9da99a82f198e41fba24da6b0d7ae59a Author: Björn Schießle <schiessle@owncloud.com> Date: Thu Jun 20 16:27:46 2013 +0200 add l10n support commit bf2c79c8de8710e839a4a55642a91874c374fa1c Author: Björn Schießle <schiessle@owncloud.com> Date: Thu Jun 20 16:19:10 2013 +0200 only init session if openssl extension is loaded commit cbd52af6afbaa310bb1a534db64ff5e476dfd5d7 Author: Björn Schießle <schiessle@owncloud.com> Date: Thu Jun 20 12:25:40 2013 +0200 first disable app and than show error page commit 55baf593179c433642de59552592e6b0f1932880 Author: Björn Schießle <schiessle@owncloud.com> Date: Thu Jun 20 12:17:34 2013 +0200 typo fixed commit 1d9bef0b058e7cc3d511b81ae12d5a07660c75b2 Author: Björn Schießle <schiessle@owncloud.com> Date: Thu Jun 20 12:15:40 2013 +0200 move dependency check to the encryption app commit c186e95da526f0470e20f014f1bd9513db5518ff Author: Björn Schießle <schiessle@owncloud.com> Date: Thu Jun 20 11:13:11 2013 +0200 make sure that openssl is installed and loaded
Diffstat (limited to 'apps/files_encryption/hooks')
-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('/');