]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed incompatibilities with filecache rewrite merge
authorSam Tuke <samtuke@owncloud.com>
Thu, 31 Jan 2013 16:49:07 +0000 (16:49 +0000)
committerSam Tuke <samtuke@owncloud.com>
Thu, 31 Jan 2013 16:49:07 +0000 (16:49 +0000)
apps/files_encryption/lib/crypt.php
apps/files_encryption/lib/proxy.php

index 9d4f5a1fae0a30c3e61420bf56ee98ab5072792c..106b757307d900b7dbc42a0d4897b2cfd3a8fda4 100755 (executable)
@@ -170,10 +170,10 @@ class Crypt {
         */\r
        public static function isEncryptedMeta( $path ) {\r
        \r
-               // TODO: Use DI to get OC_FileCache_Cached out of here\r
+               // TODO: Use DI to get \OC\Files\Filesystem out of here\r
        \r
                // Fetch all file metadata from DB\r
-               $metadata = \OC_FileCache_Cached::get( $path, '' );\r
+               $metadata = \OC\Files\Filesystem::getFileInfo( $path, '' );\r
                \r
                // Return encryption status\r
                return isset( $metadata['encrypted'] ) and ( bool )$metadata['encrypted'];\r
@@ -187,7 +187,7 @@ class Crypt {
        public static function isLegacyEncryptedContent( $content ) {\r
        \r
                // Fetch all file metadata from DB\r
-               $metadata = \OC_FileCache_Cached::get( $content, '' );\r
+               $metadata = \OC\Files\Filesystem::getFileInfo( $content, '' );\r
        \r
                // If a file is flagged with encryption in DB, but isn't a \r
                // valid content + IV combination, it's probably using the \r
index f7245d11cf56ee65917b4109d2dae9147b5af9e6..55cddf2bec81761ca0b6ccbcd27d7fbce7237219 100644 (file)
@@ -129,7 +129,7 @@ class Proxy extends \OC_FileProxy {
                                Keymanager::setFileKey( $view, $filePath, $userId, $encrypted['key'] );
                                
                                // Update the file cache with file info
-                               \OC_FileCache::put( $path, array( 'encrypted'=>true, 'size' => $size ), '' );
+                               \OC\Files\Filesystem::putFileInfo( $path, array( 'encrypted'=>true, 'size' => $size ), '' );
                                
                                // Re-enable proxy - our work is done
                                \OC_FileProxy::$enabled = true;
@@ -162,7 +162,7 @@ class Proxy extends \OC_FileProxy {
                        
                        $filePath = '/' . implode( '/', $filePath );
                        
-                       //$cached = \OC_FileCache_Cached::get( $path, '' );
+                       //$cached = \OC\Files\Filesystem::getFileInfo( $path, '' );
                        
                        $view = new \OC_FilesystemView( '' );
                        
@@ -363,7 +363,7 @@ class Proxy extends \OC_FileProxy {
        
                if ( Crypt::isCatfile( $path ) ) {
                
-                       $cached = \OC_FileCache_Cached::get( $path, '' );
+                       $cached = \OC\Files\Filesystem::getFileInfo( $path, '' );
                        
                        $data['size'] = $cached['size'];
                        
@@ -376,7 +376,7 @@ class Proxy extends \OC_FileProxy {
                
                if ( Crypt::isCatfile( $path ) ) {
                        
-                       $cached = \OC_FileCache_Cached::get( $path, '' );
+                       $cached = \OC\Files\Filesystem::getFileInfo( $path, '' );
                        
                        return  $cached['size'];