summaryrefslogtreecommitdiffstats
path: root/apps/encryption/settings
diff options
context:
space:
mode:
authorClark Tomlinson <fallen013@gmail.com>2015-03-26 20:35:36 -0400
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:27 +0200
commitd15c2e52b0576e7846a09fd84e0e10f3054623c6 (patch)
treef027d9cb18160353fe440e4eef48be8aa7cdea99 /apps/encryption/settings
parent2e00acda079644ce4eb61b8a3812b095df8d05e3 (diff)
downloadnextcloud-server-d15c2e52b0576e7846a09fd84e0e10f3054623c6.tar.gz
nextcloud-server-d15c2e52b0576e7846a09fd84e0e10f3054623c6.zip
cleanup and removing cachefactory
Diffstat (limited to 'apps/encryption/settings')
-rw-r--r--apps/encryption/settings/settings-admin.php4
-rw-r--r--apps/encryption/settings/settings-personal.php12
2 files changed, 8 insertions, 8 deletions
diff --git a/apps/encryption/settings/settings-admin.php b/apps/encryption/settings/settings-admin.php
index d3acdfe2ba4..a32359bdfac 100644
--- a/apps/encryption/settings/settings-admin.php
+++ b/apps/encryption/settings/settings-admin.php
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright (c) 2011 Robin Appelman <icewind@owncloud.com>
+ * Copyright (c) 2015 Clark Tomlinson <clark@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
@@ -16,7 +16,7 @@ $tmpl = new OCP\Template('files_encryption', 'settings-admin');
$recoveryAdminEnabled = \OC::$server->getConfig()->getAppValue('encryption', 'recoveryAdminEnabled', '0');
$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
-$tmpl->assign('initStatus', KeyManager::$cacheFactory->get('initStatus'));
+$tmpl->assign('initStatus', KeyManager::$session->get('initStatus'));
\OCP\Util::addscript('files_encryption', 'settings-admin');
\OCP\Util::addscript('core', 'multiselect');
diff --git a/apps/encryption/settings/settings-personal.php b/apps/encryption/settings/settings-personal.php
index fe2d846f50a..dc1ef167b11 100644
--- a/apps/encryption/settings/settings-personal.php
+++ b/apps/encryption/settings/settings-personal.php
@@ -1,17 +1,17 @@
<?php
/**
- * Copyright (c) 2013 Sam Tuke <samtuke@owncloud.com>
+ * Copyright (c) 2015 Clark Tomlinson <clark@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
// Add CSS stylesheet
-\OC_Util::addStyle('files_encryption', 'settings-personal');
+\OC_Util::addStyle('encryption', 'settings-personal');
-$tmpl = new OCP\Template('files_encryption', 'settings-personal');
+$tmpl = new OCP\Template('encryption', 'settings-personal');
-$user = \OCP\USER::getUser();
+$user = \OCP\User::getUser();
$view = new \OC\Files\View('/');
$util = new \OCA\Files_Encryption\Util($view, $user);
$session = new \OCA\Files_Encryption\Session($view);
@@ -20,14 +20,14 @@ $privateKeySet = $session->getPrivateKey() !== false;
// did we tried to initialize the keys for this session?
$initialized = $session->getInitialized();
-$recoveryAdminEnabled = \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryAdminEnabled');
+$recoveryAdminEnabled = \OC::$server->getConfig()->getAppValue('encryption', 'recoveryAdminEnabled');
$recoveryEnabledForUser = $util->recoveryEnabledForUser();
$result = false;
if ($recoveryAdminEnabled || !$privateKeySet) {
- \OCP\Util::addscript('files_encryption', 'settings-personal');
+ \OCP\Util::addscript('encryption', 'settings-personal');
$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
$tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);