diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-06-10 11:03:07 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-07-29 13:36:06 +0200 |
commit | 2c8e5ec84ff98088fb9e3b275735098beaa5e27f (patch) | |
tree | e0cf14263f97b2b3296ca52a6422dbe74b0ad598 /settings/personal.php | |
parent | 48621115c10f62f776dbe41ad9a51c1ac360fc8c (diff) | |
download | nextcloud-server-2c8e5ec84ff98088fb9e3b275735098beaa5e27f.tar.gz nextcloud-server-2c8e5ec84ff98088fb9e3b275735098beaa5e27f.zip |
user interface to allow user to decrypt all his files once the encryption app was disabled
Conflicts:
settings/templates/personal.php
Diffstat (limited to 'settings/personal.php')
-rw-r--r-- | settings/personal.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/settings/personal.php b/settings/personal.php index 1e2e1cf6723..4961661e250 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -24,6 +24,15 @@ $email=OC_Preferences::getValue(OC_User::getUser(), 'settings', 'email', ''); $userLang=OC_Preferences::getValue( OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage() ); $languageCodes=OC_L10N::findAvailableLanguages(); +//check if encryption was enabled in the past +$enableDecryptAll = false; +if (OC_App::isEnabled('files_encryption') === false) { + $view = new OC\Files\View('/'.OC_User::getUser()); + if ($view->file_exists('files_encryption/keyfiles')) { + $enableDecryptAll = true; + } +} + // array of common languages $commonlangcodes = array( 'en', 'es', 'fr', 'de', 'de_DE', 'ja_JP', 'ar', 'ru', 'nl', 'it', 'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'zh_CN', 'ko' @@ -80,6 +89,7 @@ $tmpl->assign('activelanguage', $userLang); $tmpl->assign('passwordChangeSupported', OC_User::canUserChangePassword(OC_User::getUser())); $tmpl->assign('displayNameChangeSupported', OC_User::canUserChangeDisplayName(OC_User::getUser())); $tmpl->assign('displayName', OC_User::getDisplayName()); +$tmpl->assign('enableDecryptAll' , true); $forms=OC_App::getForms('personal'); $tmpl->assign('forms', array()); |