diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2012-06-22 17:43:04 -0400 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-06-27 01:05:36 +0200 |
commit | 71350bc61879ab2e532d5f55c058b4fba9341656 (patch) | |
tree | 8c415a1fbcb96f0aa0878b5481581cfcc1105ecc /lib/files.php | |
parent | 10986f00dc88dceeb5a052ff7651609d1e9b1465 (diff) | |
download | nextcloud-server-71350bc61879ab2e532d5f55c058b4fba9341656.tar.gz nextcloud-server-71350bc61879ab2e532d5f55c058b4fba9341656.zip |
I'm having trouble making up my mind... translateItem -> getItems() -> formatItems(). It may change again. Preparing shared storage for new api.
Diffstat (limited to 'lib/files.php')
-rw-r--r-- | lib/files.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/files.php b/lib/files.php index 469c3a15b8e..2feae20afe6 100644 --- a/lib/files.php +++ b/lib/files.php @@ -34,6 +34,11 @@ class OC_Files { */ public static function getDirectoryContent($directory, $mimetype_filter = ''){ $files=OC_FileCache::getFolderContent($directory, false, $mimetype_filter); + if ($directory == '') { + $files = array_merge($files, array()); + } else if (substr($directory, 7) == '/Shared') { + $files = array_merge($files, OCP\Share::getItemsSharedWith('file', $directory, OC_Share_Backend_File::FORMAT_FILE_APP)); + } foreach($files as &$file){ $file['directory']=$directory; $file['type']=($file['mimetype']=='httpd/unix-directory')?'dir':'file'; |