summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-07-04 17:16:02 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-07-04 17:18:36 +0200
commit5d61b85a1dace6ebb41025deaad019af8b3e5145 (patch)
tree1302e8d80c5942bf4bb741d8b8257b9ce26471da /apps/files_external/lib
parentb2eac08ad3a279ab81c508929c68d947bedbc9da (diff)
downloadnextcloud-server-5d61b85a1dace6ebb41025deaad019af8b3e5145.tar.gz
nextcloud-server-5d61b85a1dace6ebb41025deaad019af8b3e5145.zip
allow users to upload ssl root certificates for the webdav client
Diffstat (limited to 'apps/files_external/lib')
-rwxr-xr-xapps/files_external/lib/config.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 95f8beeb49e..4e82e6b2548 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -237,6 +237,21 @@ class OC_Mount_Config {
$content .= ");\n?>";
@file_put_contents($file, $content);
}
+
+ /**
+ * Returns all user uploaded ssl root certificates
+ * @return array
+ */
+ public static function getCertificates() {
+ $view = \OCP\Files::getStorage('files_external');
+ $path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("");
+ $result = array();
+ $handle = opendir($path);
+ while (false !== ($file = readdir($handle))) {
+ if($file != '.' && $file != '..') $result[] = $file;
+ }
+ return $result;
+ }
}