diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-02 00:20:45 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-02 00:20:45 +0200 |
commit | 93b63cf3755d3f1295c976c308b81c6340883abb (patch) | |
tree | 8e8a7413ea75723b7d21e18661a10842d1970bf1 /apps/files_encryption | |
parent | e48f511606a1ef64aa39099055dd6ae437f45d03 (diff) | |
download | nextcloud-server-93b63cf3755d3f1295c976c308b81c6340883abb.tar.gz nextcloud-server-93b63cf3755d3f1295c976c308b81c6340883abb.zip |
ported the rest of the OC_Helper calls
Diffstat (limited to 'apps/files_encryption')
-rwxr-xr-x | apps/files_encryption/lib/proxy.php | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/files_encryption/tests/encryption.php | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/files_encryption/tests/stream.php | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 11a6a84e667..cbe88adb5e4 100755 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -92,7 +92,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ //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'); - OC_Helper::streamCopy($result,$tmp); + OCP\Util::streamCopy($result,$tmp); fclose($result); OC_Filesystem::file_put_contents($path,$tmp); fclose($tmp); @@ -104,7 +104,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ public function postGetMimeType($path,$mime){ if(self::isEncrypted($path)){ - $mime=OC_Helper::getMimeType('crypt://'.$path,'w'); + $mime=OCP\Util::getMimeType('crypt://'.$path,'w'); } return $mime; } diff --git a/apps/files_encryption/tests/encryption.php b/apps/files_encryption/tests/encryption.php index 13093256717..24b3bbcaf40 100644..100755 --- a/apps/files_encryption/tests/encryption.php +++ b/apps/files_encryption/tests/encryption.php @@ -27,14 +27,14 @@ class Test_Encryption extends UnitTestCase { $this->assertNotEqual($encrypted,$source); $this->assertEqual($decrypted,$source); - $tmpFileEncrypted=OC_Helper::tmpFile(); + $tmpFileEncrypted=OCP\Util::tmpFile(); OC_Crypt::encryptfile($file,$tmpFileEncrypted,$key); $encrypted=file_get_contents($tmpFileEncrypted); $decrypted=OC_Crypt::blockDecrypt($encrypted,$key); $this->assertNotEqual($encrypted,$source); $this->assertEqual($decrypted,$source); - $tmpFileDecrypted=OC_Helper::tmpFile(); + $tmpFileDecrypted=OCP\Util::tmpFile(); OC_Crypt::decryptfile($tmpFileEncrypted,$tmpFileDecrypted,$key); $decrypted=file_get_contents($tmpFileDecrypted); $this->assertEqual($decrypted,$source); diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 578b091a36c..225e82c99e8 100644..100755 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -22,7 +22,7 @@ class Test_CryptStream extends UnitTestCase { $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; $source=fopen($file,'r'); $target=$this->getStream('test2','w'); - OC_Helper::streamCopy($source,$target); + OCP\Util::streamCopy($source,$target); fclose($target); fclose($source); @@ -44,7 +44,7 @@ class Test_CryptStream extends UnitTestCase { $id=uniqid(); } if(!isset($this->tmpFiles[$id])){ - $file=OC_Helper::tmpFile(); + $file=OCP\Util::tmpFile(); $this->tmpFiles[$id]=$file; }else{ $file=$this->tmpFiles[$id]; |