]> source.dussan.org Git - nextcloud-server.git/commitdiff
Actually fix shared webdav access
authorMichael Gapczynski <mtgap@owncloud.com>
Mon, 8 Oct 2012 21:21:52 +0000 (17:21 -0400)
committerMichael Gapczynski <mtgap@owncloud.com>
Mon, 8 Oct 2012 21:21:52 +0000 (17:21 -0400)
lib/files.php

index ad716115dc7b6091ca39338af8718b9f4a3d024d..47583cf6dbf404cd8cdf01053b0eaf107369e0b7 100644 (file)
@@ -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;