diff options
Diffstat (limited to 'apps/files_external/lib/Lib/Storage/FTP.php')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/FTP.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index d9e5e2a0d5a..60ee33facc0 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -47,17 +47,17 @@ class FTP extends StreamWrapper { public function __construct($params) { if (isset($params['host']) && isset($params['user']) && isset($params['password'])) { - $this->host=$params['host']; - $this->user=$params['user']; - $this->password=$params['password']; + $this->host = $params['host']; + $this->user = $params['user']; + $this->password = $params['password']; if (isset($params['secure'])) { $this->secure = $params['secure']; } else { $this->secure = false; } - $this->root=isset($params['root'])?$params['root']:'/'; - if (! $this->root || $this->root[0]!=='/') { - $this->root='/'.$this->root; + $this->root = isset($params['root'])?$params['root']:'/'; + if (! $this->root || $this->root[0] !== '/') { + $this->root = '/'.$this->root; } if (substr($this->root, -1) !== '/') { $this->root .= '/'; @@ -77,11 +77,11 @@ class FTP extends StreamWrapper { * @return string */ public function constructUrl($path) { - $url='ftp'; + $url = 'ftp'; if ($this->secure) { - $url.='s'; + $url .= 's'; } - $url.='://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path; + $url .= '://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path; return $url; } @@ -120,10 +120,10 @@ class FTP extends StreamWrapper { case 'c': case 'c+': //emulate these - if (strrpos($path, '.')!==false) { - $ext=substr($path, strrpos($path, '.')); + if (strrpos($path, '.') !== false) { + $ext = substr($path, strrpos($path, '.')); } else { - $ext=''; + $ext = ''; } $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); if ($this->file_exists($path)) { |