diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-16 12:42:37 +0400 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-16 12:42:37 +0400 |
commit | 82cbbb8ab8cfe81559c45905d7fca819d71df346 (patch) | |
tree | 947d58076dae8d5c4d0bd001ccebbe079448e057 /apps/files_encryption/hooks | |
parent | 1558cb860c2fb26fdde14fce2a16acbb29d12b3e (diff) | |
parent | 46f59b165e5bd1908509e8a62b67bf983cfd6224 (diff) |
Merge branch 'master' into encryption_improved_error_messages_4617
Conflicts:
apps/files/index.php
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index c945deeea0c..9824cb45684 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -36,14 +36,6 @@ class Hooks { */
public static function login($params) {
$l = new \OC_L10N('files_encryption');
- //check if all requirements are met
- if(!Helper::checkRequirements() || !Helper::checkConfiguration() ) {
- $error_msg = $l->t("Missing requirements.");
- $hint = $l->t('Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been 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('/');
@@ -54,6 +46,15 @@ class Hooks { $util = new Util($view, $params['uid']);
+ //check if all requirements are met
+ if(!$util->ready() && (!Helper::checkRequirements() || !Helper::checkConfiguration())) {
+ $error_msg = $l->t("Missing requirements.");
+ $hint = $l->t('Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.');
+ \OC_App::disable('files_encryption');
+ \OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR);
+ \OCP\Template::printErrorPage($error_msg, $hint);
+ }
+
// setup user, if user not ready force relogin
if (Helper::setupUser($util, $params['password']) === false) {
return false;
|