2012-08-02 12:39:30 +04:00
|
|
|
<?php
|
2012-08-02 15:55:23 +04:00
|
|
|
/**
|
2013-02-05 21:06:15 +04:00
|
|
|
* Copyright (c) 2013 Sam Tuke <samtuke@owncloud.com>
|
2012-08-02 15:55:23 +04:00
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
2012-08-02 12:39:30 +04:00
|
|
|
|
2013-05-07 18:17:38 +04:00
|
|
|
// Add CSS stylesheet
|
2013-05-30 01:13:45 +04:00
|
|
|
\OC_Util::addStyle('files_encryption', 'settings-personal');
|
|
|
|
|
|
|
|
$tmpl = new OCP\Template('files_encryption', 'settings-personal');
|
2012-08-02 12:39:30 +04:00
|
|
|
|
2013-05-01 21:18:31 +04:00
|
|
|
$user = \OCP\USER::getUser();
|
2013-05-30 01:13:45 +04:00
|
|
|
$view = new \OC_FilesystemView('/');
|
|
|
|
$util = new \OCA\Encryption\Util($view, $user);
|
2013-05-01 21:18:31 +04:00
|
|
|
|
2013-05-30 01:13:45 +04:00
|
|
|
$recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
|
2013-05-01 21:18:31 +04:00
|
|
|
$recoveryEnabledForUser = $util->recoveryEnabledForUser();
|
|
|
|
|
2013-05-30 01:13:45 +04:00
|
|
|
\OCP\Util::addscript('files_encryption', 'settings-personal');
|
|
|
|
\OCP\Util::addScript('settings', 'personal');
|
2013-05-01 21:18:31 +04:00
|
|
|
|
2013-05-30 01:13:45 +04:00
|
|
|
$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
|
|
|
|
$tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);
|
2012-08-02 12:39:30 +04:00
|
|
|
|
2013-02-05 21:06:15 +04:00
|
|
|
return $tmpl->fetchPage();
|
2012-08-02 12:39:30 +04:00
|
|
|
|