diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-10-17 16:38:11 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-17 16:38:11 +0200 |
commit | 6081bfa2bcbe121e373486273ecce58a49e6fa97 (patch) | |
tree | f2504800c66919a53eff9323724b493079569495 /lib/files.php | |
parent | c2b4e534534e083147bbad9b564179832cfa2912 (diff) | |
parent | 44287d680bd0e8799724a7595db43c0fafcaff40 (diff) | |
download | nextcloud-server-6081bfa2bcbe121e373486273ecce58a49e6fa97.tar.gz nextcloud-server-6081bfa2bcbe121e373486273ecce58a49e6fa97.zip |
Merge branch 'master' into routing
Conflicts:
lib/search/provider/file.php
settings/ajax/changepassword.php
settings/settings.php
Diffstat (limited to 'lib/files.php')
-rw-r--r-- | lib/files.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/files.php b/lib/files.php index ac999a9bd15..2b2b8b42dc4 100644 --- a/lib/files.php +++ b/lib/files.php @@ -44,15 +44,16 @@ 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 { - $path = substr($path, 7); - $info = OCP\Share::getItemSharedWith('file', $path, OC_Share_Backend_File::FORMAT_FILE_APP); + list($info) = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_File::FORMAT_FILE_APP_ROOT); + }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; } - $info = $info[0]; - } - else { + } else { $info = OC_FileCache::get($path); } return $info; |