add OCP\Files to access files

remotes/origin/stable45
Bjoern Schiessle 13 years ago
parent 9be6432aac
commit bf09bcc854
  1. 7
      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 );
}

Loading…
Cancel
Save