diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-02 13:12:05 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:30 +0200 |
commit | 8cf9b423d5b2d66694f5772bc5310d088cb466c1 (patch) | |
tree | 5da6d8471a48e00736f8af4e7b89c40abe5b66d1 /apps/encryption | |
parent | e8e5bd61aedb7a3f6105b3184b62a91fa81ce382 (diff) | |
download | nextcloud-server-8cf9b423d5b2d66694f5772bc5310d088cb466c1.tar.gz nextcloud-server-8cf9b423d5b2d66694f5772bc5310d088cb466c1.zip |
cleanup
Diffstat (limited to 'apps/encryption')
-rw-r--r-- | apps/encryption/hooks/userhooks.php | 6 | ||||
-rw-r--r-- | apps/encryption/settings/settings-personal.php | 26 | ||||
-rw-r--r-- | apps/encryption/templates/invalid_private_key.php | 12 |
3 files changed, 15 insertions, 29 deletions
diff --git a/apps/encryption/hooks/userhooks.php b/apps/encryption/hooks/userhooks.php index 3b56135c36b..742c7d7580b 100644 --- a/apps/encryption/hooks/userhooks.php +++ b/apps/encryption/hooks/userhooks.php @@ -201,7 +201,7 @@ class UserHooks implements IHook { } } - /** + /** * Change a user's encryption passphrase * * @param array $params keys: uid, password @@ -225,7 +225,7 @@ class UserHooks implements IHook { $this->keyManager->setPrivateKey($this->user->getUser()->getUID(), $encryptedPrivateKey); } else { - $this->log->error('Encryption could not update users encryption password'); + $this->logger->error('Encryption could not update users encryption password'); } // NOTE: Session does not need to be updated as the @@ -266,7 +266,7 @@ class UserHooks implements IHook { $this->recovery->recoverUsersFiles($recoveryPassword, $user); } } else { - $this->log->error('Encryption Could not update users encryption password'); + $this->logger->error('Encryption Could not update users encryption password'); } } } diff --git a/apps/encryption/settings/settings-personal.php b/apps/encryption/settings/settings-personal.php index 417bf1433bf..ec3d30f457d 100644 --- a/apps/encryption/settings/settings-personal.php +++ b/apps/encryption/settings/settings-personal.php @@ -6,33 +6,31 @@ * See the COPYING-README file. */ -// Add CSS stylesheet -\OC_Util::addStyle('encryption', 'settings-personal'); - $session = new \OCA\Encryption\Session(\OC::$server->getSession()); +$userSession = \OC::$server->getUserSession(); -$tmpl = new OCP\Template('encryption', 'settings-personal'); +$template = new OCP\Template('encryption', 'settings-personal'); $crypt = new \OCA\Encryption\Crypto\Crypt( \OC::$server->getLogger(), - \OC::$server->getUserSession(), + $userSession, \OC::$server->getConfig()); $util = new \OCA\Encryption\Util( new \OC\Files\View(), $crypt, \OC::$server->getLogger(), - \OC::$server->getUserSession(), + $userSession, \OC::$server->getConfig()); -$keymanager = new \OCA\Encryption\KeyManager( +$keyManager = new \OCA\Encryption\KeyManager( \OC::$server->getEncryptionKeyStorage(\OCA\Encryption\Crypto\Encryption::ID), $crypt, \OC::$server->getConfig(), - \OC::$server->getUserSession(), + $userSession, $session, \OC::$server->getLogger(), $util); -$user = \OCP\User::getUser(); +$user = $userSession->getUser()->getUID(); $view = new \OC\Files\View('/'); @@ -48,12 +46,12 @@ $recoveryEnabledForUser = $util->isRecoveryEnabledForUser(); $result = false; if ($recoveryAdminEnabled || !$privateKeySet) { - $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled); - $tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser); - $tmpl->assign('privateKeySet', $privateKeySet); - $tmpl->assign('initialized', $initialized); + $template->assign('recoveryEnabled', $recoveryAdminEnabled); + $template->assign('recoveryEnabledForUser', $recoveryEnabledForUser); + $template->assign('privateKeySet', $privateKeySet); + $template->assign('initialized', $initialized); - $result = $tmpl->fetchPage(); + $result = $template->fetchPage(); } return $result; diff --git a/apps/encryption/templates/invalid_private_key.php b/apps/encryption/templates/invalid_private_key.php deleted file mode 100644 index b148e65b199..00000000000 --- a/apps/encryption/templates/invalid_private_key.php +++ /dev/null @@ -1,12 +0,0 @@ -<ul> - <li class='error'> - <?php $location = \OC_Helper::linkToRoute( "settings_personal" ).'#changePKPasswd' ?> - - <?php p($_['message']); ?> - <br/> - <?php if($_['errorCode'] === \OCA\Files_Encryption\Crypt::ENCRYPTION_PRIVATE_KEY_NOT_VALID_ERROR): ?> - <?php p($l->t('Go directly to your %spersonal settings%s.', array('<a href="'.$location.'">', '</a>'))); ?> - <?php endif; ?> - <br/> - </li> -</ul> |