summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/settings-personal.php
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2013-02-05 17:06:15 +0000
committerSam Tuke <samtuke@owncloud.com>2013-02-05 17:06:15 +0000
commitb84e83261ec8caf2ce128017d703e4139e3f6211 (patch)
tree2e79b558d897ac2c9afeb5b8f9fadb2b7155266c /apps/files_encryption/settings-personal.php
parent680c5b3dad9f83b912da3a0629060525d08c2165 (diff)
downloadnextcloud-server-b84e83261ec8caf2ce128017d703e4139e3f6211.tar.gz
nextcloud-server-b84e83261ec8caf2ce128017d703e4139e3f6211.zip
Added notice to personal settings indicating what filetypes are not encrypted
Diffstat (limited to 'apps/files_encryption/settings-personal.php')
-rw-r--r--apps/files_encryption/settings-personal.php24
1 files changed, 7 insertions, 17 deletions
diff --git a/apps/files_encryption/settings-personal.php b/apps/files_encryption/settings-personal.php
index 014288f2efe..6fe4ea6d564 100644
--- a/apps/files_encryption/settings-personal.php
+++ b/apps/files_encryption/settings-personal.php
@@ -1,29 +1,19 @@
<?php
/**
- * Copyright (c) 2012 Bjoern Schiessle <schiessle@owncloud.com>
+ * Copyright (c) 2013 Sam Tuke <samtuke@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
-$sysEncMode = \OC_Appconfig::getValue('files_encryption', 'mode', 'none');
+$tmpl = new OCP\Template( 'files_encryption', 'settings-personal');
-if ($sysEncMode == 'user') {
+$blackList = explode( ',', \OCP\Config::getAppValue( 'files_encryption', 'type_blacklist', 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg' ) );
- $tmpl = new OCP\Template( 'files_encryption', 'settings-personal');
+$tmpl->assign( 'blacklist', $blackList );
- $query = \OC_DB::prepare( "SELECT mode FROM *PREFIX*encryption WHERE uid = ?" );
- $result = $query->execute(array(\OCP\User::getUser()));
-
- if ($row = $result->fetchRow()){
- $mode = $row['mode'];
- } else {
- $mode = 'none';
- }
-
- OCP\Util::addscript('files_encryption','settings-personal');
- $tmpl->assign('encryption_mode', $mode);
- return $tmpl->fetchPage();
-}
+OCP\Util::addscript('files_encryption','settings-personal');
+
+return $tmpl->fetchPage();
return null;