summaryrefslogtreecommitdiffstats
path: root/lib/archive
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-10-05 12:39:43 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-10-05 12:42:11 +0200
commitb5f11195af171edfbbc4fae2e1b7f4832f777f68 (patch)
tree8636223342970f6ca173631885604073e792b025 /lib/archive
parent00b34a09eaeba2f74a44a155f0fdd4aa58d5e502 (diff)
downloadnextcloud-server-b5f11195af171edfbbc4fae2e1b7f4832f777f68.tar.gz
nextcloud-server-b5f11195af171edfbbc4fae2e1b7f4832f777f68.zip
fix checkstyle on archive zip/tar
Diffstat (limited to 'lib/archive')
-rw-r--r--lib/archive/tar.php5
-rw-r--r--lib/archive/zip.php7
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/archive/tar.php b/lib/archive/tar.php
index 21d8057e4d6..9aaa6d12796 100644
--- a/lib/archive/tar.php
+++ b/lib/archive/tar.php
@@ -127,7 +127,10 @@ class OC_Archive_TAR extends OC_Archive{
$this->cachedHeaders = $this->tar->listContent();
}
foreach($this->cachedHeaders as $header) {
- if($file==$header['filename'] or $file.'/'==$header['filename'] or '/'.$file.'/'==$header['filename'] or '/'.$file==$header['filename']) {
+ if( $file == $header['filename']
+ or $file.'/' == $header['filename']
+ or '/'.$file.'/' == $header['filename']
+ or '/'.$file == $header['filename']) {
return $header;
}
}
diff --git a/lib/archive/zip.php b/lib/archive/zip.php
index a2b07f1a35d..d016c692e35 100644
--- a/lib/archive/zip.php
+++ b/lib/archive/zip.php
@@ -86,7 +86,7 @@ class OC_Archive_ZIP extends OC_Archive{
$pathLength=strlen($path);
foreach($files as $file) {
if(substr($file, 0, $pathLength)==$path and $file!=$path) {
- if(strrpos(substr($file, 0, -1),'/')<=$pathLength) {
+ if(strrpos(substr($file, 0, -1), '/')<=$pathLength) {
$folderContent[]=substr($file, $pathLength);
}
}
@@ -161,7 +161,10 @@ class OC_Archive_ZIP extends OC_Archive{
function getStream($path,$mode) {
if($mode=='r' or $mode=='rb') {
return $this->zip->getStream($path);
- }else{//since we cant directly get a writable stream, make a temp copy of the file and put it back in the archive when the stream is closed
+ } else {
+ //since we cant directly get a writable stream,
+ //make a temp copy of the file and put it back
+ //in the archive when the stream is closed
if(strrpos($path, '.')!==false) {
$ext=substr($path, strrpos($path, '.'));
}else{