summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-02-14 12:54:36 -0800
committerBart Visscher <bartv@thisnet.nl>2013-02-14 12:54:36 -0800
commit9058d398a7b9aac58ab4aa7379e13ca83c72281d (patch)
tree7aaa55510ab15435efc2f36cf5628f5763f3ce02 /apps/files_external
parent4320f23c87ab6b43a31b8dcb0c6e44127438f123 (diff)
parentffae6f4b847e96d691053300c355ab81edc6c1c8 (diff)
downloadnextcloud-server-9058d398a7b9aac58ab4aa7379e13ca83c72281d.tar.gz
nextcloud-server-9058d398a7b9aac58ab4aa7379e13ca83c72281d.zip
Merge pull request #1662 from owncloud/style-cleanup
Style cleanup
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/ajax/addRootCertificate.php2
-rwxr-xr-xapps/files_external/lib/config.php4
-rw-r--r--apps/files_external/lib/ftp.php4
-rw-r--r--apps/files_external/lib/smb.php2
-rw-r--r--apps/files_external/lib/streamwrapper.php24
-rw-r--r--apps/files_external/lib/swift.php4
-rw-r--r--apps/files_external/lib/webdav.php20
7 files changed, 30 insertions, 30 deletions
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
index ba8a14d2ea1..7794238ab36 100644
--- a/apps/files_external/ajax/addRootCertificate.php
+++ b/apps/files_external/ajax/addRootCertificate.php
@@ -14,7 +14,7 @@ fclose($fh);
$filename = $_FILES['rootcert_import']['name'];
$view = new \OC\Files\View('/'.\OCP\User::getUser().'/files_external/uploads');
-if (!$view->file_exists('')){
+if (!$view->file_exists('')) {
$view->mkdir('');
}
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index d78c69e83db..44e668a09c0 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -310,7 +310,7 @@ class OC_Mount_Config {
foreach ($data[self::MOUNT_TYPE_GROUP] as $group => $mounts) {
$content .= "\t\t'".$group."' => array (\n";
foreach ($mounts as $mountPoint => $mount) {
- $content .= "\t\t\t'".addcslashes($mountPoint,"'")."' => ".str_replace("\n", '', var_export($mount, true)).", \n";
+ $content .= "\t\t\t'".addcslashes($mountPoint, "'")."' => ".str_replace("\n", '', var_export($mount, true)).", \n";
}
$content .= "\t\t),\n";
@@ -322,7 +322,7 @@ class OC_Mount_Config {
foreach ($data[self::MOUNT_TYPE_USER] as $user => $mounts) {
$content .= "\t\t'".$user."' => array (\n";
foreach ($mounts as $mountPoint => $mount) {
- $content .= "\t\t\t'".addcslashes($mountPoint,"'")."' => ".str_replace("\n", '', var_export($mount, true)).",\n";
+ $content .= "\t\t\t'".addcslashes($mountPoint, "'")."' => ".str_replace("\n", '', var_export($mount, true)).",\n";
}
$content .= "\t\t),\n";
}
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php
index 9a27b63323a..9b6c037bb57 100644
--- a/apps/files_external/lib/ftp.php
+++ b/apps/files_external/lib/ftp.php
@@ -68,7 +68,7 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
case 'ab':
//these are supported by the wrapper
$context = stream_context_create(array('ftp' => array('overwrite' => true)));
- return fopen($this->constructUrl($path),$mode, false,$context);
+ return fopen($this->constructUrl($path), $mode, false, $context);
case 'r+':
case 'w+':
case 'wb+':
@@ -89,7 +89,7 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
$this->getFile($path, $tmpFile);
}
self::$tempFiles[$tmpFile]=$path;
- return fopen('close://'.$tmpFile,$mode);
+ return fopen('close://'.$tmpFile, $mode);
}
return false;
}
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index ffba0d000ca..62f6591d25a 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -33,7 +33,7 @@ class SMB extends \OC\Files\Storage\StreamWrapper{
$this->share='/'.$this->share;
}
if(substr($this->share, -1, 1)=='/') {
- $this->share = substr($this->share,0,-1);
+ $this->share = substr($this->share, 0, -1);
}
}
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index 7c3ddcf8a2c..a631e7ce06a 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -12,7 +12,7 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{
private $ready = false;
protected function init(){
- if($this->ready){
+ if($this->ready) {
return;
}
$this->ready = true;
@@ -71,39 +71,39 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{
return $succes;
}
- public function fopen($path,$mode) {
+ public function fopen($path, $mode) {
$this->init();
- return fopen($this->constructUrl($path),$mode);
+ return fopen($this->constructUrl($path), $mode);
}
public function free_space($path) {
return 0;
}
- public function touch($path,$mtime=null) {
+ public function touch($path, $mtime=null) {
$this->init();
if(is_null($mtime)) {
- $fh = $this->fopen($path,'a');
- fwrite($fh,'');
+ $fh = $this->fopen($path, 'a');
+ fwrite($fh, '');
fclose($fh);
} else {
return false;//not supported
}
}
- public function getFile($path,$target) {
+ public function getFile($path, $target) {
$this->init();
- return copy($this->constructUrl($path),$target);
+ return copy($this->constructUrl($path), $target);
}
- public function uploadFile($path,$target) {
+ public function uploadFile($path, $target) {
$this->init();
- return copy($path,$this->constructUrl($target));
+ return copy($path, $this->constructUrl($target));
}
- public function rename($path1,$path2) {
+ public function rename($path1, $path2) {
$this->init();
- return rename($this->constructUrl($path1),$this->constructUrl($path2));
+ return rename($this->constructUrl($path1), $this->constructUrl($path2));
}
public function stat($path) {
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index cbf2007052b..0fd6fa143b8 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -210,7 +210,7 @@ class SWIFT extends \OC\Files\Storage\Common{
return false;
} else {
$fh=fopen($tmpFile, 'a');
- fwrite($fh,$name . "\n");
+ fwrite($fh, $name . "\n");
}
} catch(\Exception $e) {
file_put_contents($tmpFile, $name . "\n");
@@ -290,7 +290,7 @@ class SWIFT extends \OC\Files\Storage\Common{
}
private function init(){
- if($this->ready){
+ if($this->ready) {
return;
}
$this->ready = true;
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 2a953ac63f4..039a07b1ef2 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -49,7 +49,7 @@ class DAV extends \OC\Files\Storage\Common{
}
private function init(){
- if($this->ready){
+ if($this->ready) {
return;
}
$this->ready = true;
@@ -153,10 +153,10 @@ class DAV extends \OC\Files\Storage\Common{
public function unlink($path) {
$this->init();
- return $this->simpleResponse('DELETE', $path, null ,204);
+ return $this->simpleResponse('DELETE', $path, null, 204);
}
- public function fopen($path,$mode) {
+ public function fopen($path, $mode) {
$this->init();
$path=$this->cleanPath($path);
switch($mode) {
@@ -235,13 +235,13 @@ class DAV extends \OC\Files\Storage\Common{
$this->client->proppatch($path, array('{DAV:}lastmodified' => $mtime));
}
- public function getFile($path,$target) {
+ public function getFile($path, $target) {
$this->init();
- $source=$this->fopen($path,'r');
- file_put_contents($target,$source);
+ $source=$this->fopen($path, 'r');
+ file_put_contents($target, $source);
}
- public function uploadFile($path,$target) {
+ public function uploadFile($path, $target) {
$this->init();
$source=fopen($path, 'r');
@@ -256,7 +256,7 @@ class DAV extends \OC\Files\Storage\Common{
curl_close ($curl);
}
- public function rename($path1,$path2) {
+ public function rename($path1, $path2) {
$this->init();
$path1=$this->cleanPath($path1);
$path2=$this->root.$this->cleanPath($path2);
@@ -268,7 +268,7 @@ class DAV extends \OC\Files\Storage\Common{
}
}
- public function copy($path1,$path2) {
+ public function copy($path1, $path2) {
$this->init();
$path1=$this->cleanPath($path1);
$path2=$this->root.$this->cleanPath($path2);
@@ -321,7 +321,7 @@ class DAV extends \OC\Files\Storage\Common{
}
}
- private function simpleResponse($method,$path,$body,$expected) {
+ private function simpleResponse($method, $path, $body, $expected) {
$path=$this->cleanPath($path);
try {
$response=$this->client->request($method, $path, $body);