summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-25 14:36:00 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-25 14:36:00 +0100
commit914ac09aaec9e4f8c5e0ed10ca881cc85cef4b28 (patch)
treede16ef66b04b3a6525eb334db311a97ff015f63c /apps/files_external/lib
parent202bf17e4acff00d48ffd94ed95d83e53f3dec90 (diff)
parentdb2ddb54413831adef41fe5e233481a2d546731d (diff)
downloadnextcloud-server-914ac09aaec9e4f8c5e0ed10ca881cc85cef4b28.tar.gz
nextcloud-server-914ac09aaec9e4f8c5e0ed10ca881cc85cef4b28.zip
Merge pull request #22636 from owncloud/fix-ssl-on-external-storages
Fix HTTPS support on external storages
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/storageconfig.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_external/lib/storageconfig.php b/apps/files_external/lib/storageconfig.php
index 42c515f4671..ef859e8ae8a 100644
--- a/apps/files_external/lib/storageconfig.php
+++ b/apps/files_external/lib/storageconfig.php
@@ -211,6 +211,20 @@ class StorageConfig implements \JsonSerializable {
* @param array $backendOptions backend options
*/
public function setBackendOptions($backendOptions) {
+ if($this->getBackend() instanceof Backend) {
+ $parameters = $this->getBackend()->getParameters();
+ foreach($backendOptions as $key => $value) {
+ if(isset($parameters[$key])) {
+ switch ($parameters[$key]->getType()) {
+ case \OCA\Files_External\Lib\DefinitionParameter::VALUE_BOOLEAN:
+ $value = (bool)$value;
+ break;
+ }
+ $backendOptions[$key] = $value;
+ }
+ }
+ }
+
$this->backendOptions = $backendOptions;
}