diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-10-08 17:21:52 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-10-08 17:21:52 -0400 |
commit | 025d308929263723887c271cf748bd4e5c71697c (patch) | |
tree | 703b6d1ded4a6486b86c97d216f315a5cbbad0f4 /lib/files.php | |
parent | 33d1906f23155cd3656977f38da27e1e77ae17a3 (diff) | |
download | nextcloud-server-025d308929263723887c271cf748bd4e5c71697c.tar.gz nextcloud-server-025d308929263723887c271cf748bd4e5c71697c.zip |
Actually fix shared webdav access
Diffstat (limited to 'lib/files.php')
-rw-r--r-- | lib/files.php | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/lib/files.php b/lib/files.php index ad716115dc7..47583cf6dbf 100644 --- a/lib/files.php +++ b/lib/files.php @@ -43,22 +43,13 @@ class OC_Files { */ public static function getFileInfo($path) { if (($path == '/Shared' || substr($path, 0, 8) == '/Shared/') && OC_App::isEnabled('files_sharing')) { - if ($path == '/Shared') { - $info = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_File::FORMAT_FILE_APP_ROOT); - } - else { - $pos = strpos($path, '/', 8); - // Get shared folder name - if ($pos !== false) { - $itemTarget = substr($path, 7, $pos - 7); - } else { - $itemTarget = substr($path, 7); - } - $info = OCP\Share::getItemSharedWith('file', $itemTarget, OC_Share_Backend_File::FORMAT_FILE_APP, array('folder' => $path)); - } - $info = $info[0]; - } - else { + $info['size'] = OC_Filesystem::filesize($path); + $info['mtime'] = OC_Filesystem::filemtime($path); + $info['ctime'] = OC_Filesystem::filectime($path); + $info['mimetype'] = OC_Filesystem::getMimeType($path); + $info['encrypted'] = false; + $info['versioned'] = false; + } else { $info = OC_FileCache::get($path); } return $info; |