diff options
Diffstat (limited to 'apps/files_encryption/settings-personal.php')
-rw-r--r-- | apps/files_encryption/settings-personal.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/apps/files_encryption/settings-personal.php b/apps/files_encryption/settings-personal.php new file mode 100644 index 00000000000..014288f2efe --- /dev/null +++ b/apps/files_encryption/settings-personal.php @@ -0,0 +1,29 @@ +<?php
+/**
+ * Copyright (c) 2012 Bjoern Schiessle <schiessle@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');
+
+if ($sysEncMode == 'user') {
+
+ $tmpl = new OCP\Template( 'files_encryption', 'settings-personal');
+
+ $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();
+}
+
+return null;
|