diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 17:38:27 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 17:38:27 +0200 |
commit | d0554bef069b29affa95ec3c2bf78af637703a90 (patch) | |
tree | f28c25fef284dc6b61425917e79a812c85274597 /apps/files_encryption | |
parent | 7ded9cf520f74b595bc0f8939ac59249b47ccbc9 (diff) | |
download | nextcloud-server-d0554bef069b29affa95ec3c2bf78af637703a90.tar.gz nextcloud-server-d0554bef069b29affa95ec3c2bf78af637703a90.zip |
finish porting of the LOG calls or the apps to the public api
Diffstat (limited to 'apps/files_encryption')
-rwxr-xr-x[-rw-r--r--] | apps/files_encryption/lib/cryptstream.php | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/files_encryption/lib/proxy.php | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php index 07a2e523a42..1a7c595cb83 100644..100755 --- a/apps/files_encryption/lib/cryptstream.php +++ b/apps/files_encryption/lib/cryptstream.php @@ -42,12 +42,12 @@ class OC_CryptStream{ $this->path=self::$sourceStreams[basename($path)]['path']; }else{ $this->path=$path; - OC_Log::write('files_encryption','open encrypted '.$path. ' in '.$mode,OC_Log::DEBUG); + OCP\Util::writeLog('files_encryption','open encrypted '.$path. ' in '.$mode,OCP\Util::DEBUG); OC_FileProxy::$enabled=false;//disable fileproxies so we can open the source file $this->source=OC_FileSystem::fopen($path,$mode); OC_FileProxy::$enabled=true; if(!is_resource($this->source)){ - OC_Log::write('files_encryption','failed to open '.$path,OC_Log::ERROR); + OCP\Util::writeLog('files_encryption','failed to open '.$path,OCP\Util::ERROR); } } if(is_resource($this->source)){ @@ -68,7 +68,7 @@ class OC_CryptStream{ //$count will always be 8192 https://bugs.php.net/bug.php?id=21641 //This makes this function a lot simpler but will breake everything the moment it's fixed if($count!=8192){ - OC_Log::write('files_encryption','php bug 21641 no longer holds, decryption will not work',OC_Log::FATAL); + OCP\Util::writeLog('files_encryption','php bug 21641 no longer holds, decryption will not work',OCP\Util::FATAL); die(); } $data=fread($this->source,8192); @@ -135,4 +135,4 @@ class OC_CryptStream{ } return fclose($this->source); } -}
\ No newline at end of file +} diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index d65bcba8bfa..11a6a84e667 100644..100755 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -90,7 +90,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ }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 - OC_Log::write('files_encryption','Decrypting '.$path.' before writing',OC_Log::DEBUG); + OCP\Util::writeLog('files_encryption','Decrypting '.$path.' before writing',OCP\Util::DEBUG); $tmp=fopen('php://temp'); OC_Helper::streamCopy($result,$tmp); fclose($result); |