diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-08-29 00:50:12 +0200 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-08-29 00:50:12 +0200 |
commit | fe49cbafc77f8a197dfe5c947360d9e52396d081 (patch) | |
tree | 4a2a1c027c809f0ae29d638231127a1003344959 /apps/files/ajax/upload.php | |
parent | f301bfd8c9f6b9beda907888708b0d465dc87a83 (diff) | |
download | nextcloud-server-fe49cbafc77f8a197dfe5c947360d9e52396d081.tar.gz nextcloud-server-fe49cbafc77f8a197dfe5c947360d9e52396d081.zip |
apply coding style
Diffstat (limited to 'apps/files/ajax/upload.php')
-rw-r--r-- | apps/files/ajax/upload.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 74e6eb560d8..813a6c67b5c 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -38,24 +38,24 @@ $totalSize=0; foreach($files['size'] as $size){ $totalSize+=$size; } -if($totalSize>OC_Filesystem::free_space('/')){ +if($totalSize>OC_Filesystem::free_space('/')) { OCP\JSON::error(array("data" => array( "message" => "Not enough space available" ))); exit(); } $result=array(); -if(strpos($dir,'..') === false){ +if(strpos($dir, '..') === false) { $fileCount=count($files['name']); for($i=0;$i<$fileCount;$i++){ $target = OCP\Files::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]); - if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i],$target)){ + if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i], $target)) { $meta=OC_FileCache_Cached::get($target); $result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'],'name'=>basename($target)); } } OCP\JSON::encodedPrint($result); exit(); -}else{ +} else { $error='invalid dir'; } |