diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2012-07-04 17:16:02 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2012-07-04 17:18:36 +0200 |
commit | 5d61b85a1dace6ebb41025deaad019af8b3e5145 (patch) | |
tree | 1302e8d80c5942bf4bb741d8b8257b9ce26471da /apps/files_external/lib | |
parent | b2eac08ad3a279ab81c508929c68d947bedbc9da (diff) | |
download | nextcloud-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-x | apps/files_external/lib/config.php | 15 |
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; + } } |