diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2012-07-10 11:54:41 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2012-07-10 19:22:06 +0200 |
commit | bf09bcc8542cae436a3d712032ae51725f3d929c (patch) | |
tree | 4d2ad7f590cfa90368049f53584ae4652b13470f | |
parent | 9be6432aac30f6f34f74c343eb764a03c9adad5a (diff) | |
download | nextcloud-server-bf09bcc8542cae436a3d712032ae51725f3d929c.tar.gz nextcloud-server-bf09bcc8542cae436a3d712032ae51725f3d929c.zip |
add OCP\Files to access files
-rw-r--r-- | apps/files_versions/lib/versions.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 4f0ee2c6d52..723c27577a7 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -239,10 +239,9 @@ class Storage { $versions[$i]['version'] = ( end( $parts ) );
// if file with modified date exists, flag it in array as currently enabled version
- $curFile['fileName'] = basename( $parts[0] );
- $curFile['filePath'] = \OCP\Config::getSystemValue('datadirectory').\OC_Filesystem::getRoot().'/'.$curFile['fileName'];
-
- ( \md5_file( $ma ) == \md5_file( $curFile['filePath'] ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 );
+ $files_view = \OCP\Files::getStorage('files');
+ $local_file = $files_view->getLocalFile($filename);
+ ( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 );
}
|