summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/ftp.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-11-05 16:39:03 +0100
committerRobin Appelman <icewind@owncloud.com>2012-11-05 16:39:03 +0100
commit972243d5640c40b1f161e50f31404c71d7c290c0 (patch)
tree83bb22e6339452d936ebcc5ea9f0429cd851b06a /apps/files_external/lib/ftp.php
parent5c72d28ffdcb3290e722bd91bef3f5a5f8130f3f (diff)
downloadnextcloud-server-972243d5640c40b1f161e50f31404c71d7c290c0.tar.gz
nextcloud-server-972243d5640c40b1f161e50f31404c71d7c290c0.zip
support string values ('true' and 'false') for configuring the secure parameter on external storage backends
fixes #78
Diffstat (limited to 'apps/files_external/lib/ftp.php')
-rw-r--r--apps/files_external/lib/ftp.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php
index 2fc2a3a1a37..650ca88fd93 100644
--- a/apps/files_external/lib/ftp.php
+++ b/apps/files_external/lib/ftp.php
@@ -19,7 +19,15 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
$this->host=$params['host'];
$this->user=$params['user'];
$this->password=$params['password'];
- $this->secure=isset($params['secure'])?(bool)$params['secure']:false;
+ if(isset($params['secure'])){
+ if(is_string($params['secure'])){
+ $this->secure = ($params['secure'] === 'true');
+ }else{
+ $this->secure = (bool)$params['secure'];
+ }
+ }else{
+ $this->secure = false;
+ }
$this->root=isset($params['root'])?$params['root']:'/';
if(!$this->root || $this->root[0]!='/') {
$this->root='/'.$this->root;