summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/ftp.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-11-30 16:27:11 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-11-30 16:27:11 +0100
commit92df70b6e5c4cba373cf0b24af02c328881cdd2d (patch)
treecaa914884d58cb9118330c3823c4525c7dfd65cf /apps/files_external/lib/ftp.php
parentdf21ebeaf73bed10e972af6ef09f2bfb0df68e1c (diff)
downloadnextcloud-server-92df70b6e5c4cba373cf0b24af02c328881cdd2d.tar.gz
nextcloud-server-92df70b6e5c4cba373cf0b24af02c328881cdd2d.zip
fix checkstyle for files_external app, add whitespace for readability
Diffstat (limited to 'apps/files_external/lib/ftp.php')
-rw-r--r--apps/files_external/lib/ftp.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php
index 5b90e3049b7..e796ae446bf 100644
--- a/apps/files_external/lib/ftp.php
+++ b/apps/files_external/lib/ftp.php
@@ -19,21 +19,21 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
$this->host=$params['host'];
$this->user=$params['user'];
$this->password=$params['password'];
- if(isset($params['secure'])) {
- if(is_string($params['secure'])) {
+ if (isset($params['secure'])) {
+ if (is_string($params['secure'])) {
$this->secure = ($params['secure'] === 'true');
- }else{
+ } else {
$this->secure = (bool)$params['secure'];
}
- }else{
+ } else {
$this->secure = false;
}
$this->root=isset($params['root'])?$params['root']:'/';
- if(!$this->root || $this->root[0]!='/') {
+ if ( ! $this->root || $this->root[0]!='/') {
$this->root='/'.$this->root;
}
//create the root folder if necesary
- if (!$this->is_dir('')) {
+ if ( ! $this->is_dir('')) {
$this->mkdir('');
}
}
@@ -45,7 +45,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
*/
public function constructUrl($path) {
$url='ftp';
- if($this->secure) {
+ if ($this->secure) {
$url.='s';
}
$url.='://'.$this->user.':'.$this->password.'@'.$this->host.$this->root.$path;
@@ -71,14 +71,14 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
case 'c':
case 'c+':
//emulate these
- if(strrpos($path, '.')!==false) {
+ if (strrpos($path, '.')!==false) {
$ext=substr($path, strrpos($path, '.'));
- }else{
+ } else {
$ext='';
}
$tmpFile=OCP\Files::tmpFile($ext);
OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this, 'writeBack');
- if($this->file_exists($path)) {
+ if ($this->file_exists($path)) {
$this->getFile($path, $tmpFile);
}
self::$tempFiles[$tmpFile]=$path;
@@ -87,7 +87,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
}
public function writeBack($tmpFile) {
- if(isset(self::$tempFiles[$tmpFile])) {
+ if (isset(self::$tempFiles[$tmpFile])) {
$this->uploadFile($tmpFile, self::$tempFiles[$tmpFile]);
unlink($tmpFile);
}