diff options
Diffstat (limited to 'apps/files_encryption/lib/proxy.php')
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 61b87ab5463..fed6acaf91b 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -76,7 +76,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ public function postFile_get_contents($path,$data) { if(self::isEncrypted($path)) { $cached=OC_FileCache_Cached::get($path,''); - $data=OC_Crypt::blockDecrypt($data,'',$cached['size']); + $data=OC_Crypt::blockDecrypt($data, '', $cached['size']); } return $data; } @@ -88,30 +88,30 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ $meta=stream_get_meta_data($result); if(self::isEncrypted($path)) { fclose($result); - $result=fopen('crypt://'.$path,$meta['mode']); + $result=fopen('crypt://'.$path, $meta['mode']); }elseif(self::shouldEncrypt($path) and $meta['mode']!='r' and $meta['mode']!='rb') { if(OC_Filesystem::file_exists($path) and OC_Filesystem::filesize($path)>0) { //first encrypt the target file so we don't end up with a half encrypted file OCP\Util::writeLog('files_encryption','Decrypting '.$path.' before writing',OCP\Util::DEBUG); $tmp=fopen('php://temp'); - OCP\Files::streamCopy($result,$tmp); + OCP\Files::streamCopy($result, $tmp); fclose($result); - OC_Filesystem::file_put_contents($path,$tmp); + OC_Filesystem::file_put_contents($path, $tmp); fclose($tmp); } - $result=fopen('crypt://'.$path,$meta['mode']); + $result=fopen('crypt://'.$path, $meta['mode']); } return $result; } - public function postGetMimeType($path,$mime) { + public function postGetMimeType($path, $mime) { if(self::isEncrypted($path)) { $mime=OCP\Files::getMimeType('crypt://'.$path,'w'); } return $mime; } - public function postStat($path,$data) { + public function postStat($path, $data) { if(self::isEncrypted($path)) { $cached=OC_FileCache_Cached::get($path,''); $data['size']=$cached['size']; @@ -119,7 +119,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ return $data; } - public function postFileSize($path,$size) { + public function postFileSize($path, $size) { if(self::isEncrypted($path)) { $cached=OC_FileCache_Cached::get($path,''); return $cached['size']; |