From eae8500a86f99fc399d06a3a6c6db4a3877f4a4f Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Thu, 10 Dec 2015 14:37:53 +0100 Subject: make url type configurable --- lib/private/files/objectstore/swift.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/private/files/objectstore/swift.php') diff --git a/lib/private/files/objectstore/swift.php b/lib/private/files/objectstore/swift.php index 89ef40360a7..162b17a066c 100644 --- a/lib/private/files/objectstore/swift.php +++ b/lib/private/files/objectstore/swift.php @@ -77,7 +77,11 @@ class Swift implements IObjectStore { $serviceName = $this->params['serviceName']; } - $this->objectStoreService = $this->client->objectStoreService($serviceName, $this->params['region']); + $urlType = null; + if ($this->params['urlType']) { + $urlType = $this->params['urlType']; + } + $this->objectStoreService = $this->client->objectStoreService($serviceName, $this->params['region'], $urlType); try { $this->container = $this->objectStoreService->getContainer($this->params['container']); -- cgit v1.2.3 From 3f101039b9621837f9405f1b58357d82a712a3a0 Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Mon, 4 Jan 2016 16:38:45 +0100 Subject: add isset for optional params --- lib/private/files/objectstore/swift.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/private/files/objectstore/swift.php') diff --git a/lib/private/files/objectstore/swift.php b/lib/private/files/objectstore/swift.php index 162b17a066c..50bb0d9adf5 100644 --- a/lib/private/files/objectstore/swift.php +++ b/lib/private/files/objectstore/swift.php @@ -73,12 +73,13 @@ class Swift implements IObjectStore { // the OpenCloud client library will default to 'cloudFiles' if $serviceName is null $serviceName = null; - if ($this->params['serviceName']) { + if (isset($this->params['serviceName'])) { $serviceName = $this->params['serviceName']; } + // the OpenCloud client library will default to 'publicURL' if $urlType is null $urlType = null; - if ($this->params['urlType']) { + if (isset($this->params['urlType'])) { $urlType = $this->params['urlType']; } $this->objectStoreService = $this->client->objectStoreService($serviceName, $this->params['region'], $urlType); -- cgit v1.2.3