diff options
author | kondou <kondou@ts.unde.re> | 2013-09-14 14:35:23 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-14 14:35:23 +0200 |
commit | c117e719daf84c087faa0e5913a6fd96668edfcf (patch) | |
tree | d31abf7575b3922b155317308915488bf0226d93 /apps/files/ajax | |
parent | 556bd1ef23ca6176018a48e72f1e330269a69aab (diff) | |
download | nextcloud-server-c117e719daf84c087faa0e5913a6fd96668edfcf.tar.gz nextcloud-server-c117e719daf84c087faa0e5913a6fd96668edfcf.zip |
Use external and shared icons in OC.Dialogs.filepicker()
Diffstat (limited to 'apps/files/ajax')
-rw-r--r-- | apps/files/ajax/rawlist.php | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php index e9ae1f5305f..9ccd4cc299a 100644 --- a/apps/files/ajax/rawlist.php +++ b/apps/files/ajax/rawlist.php @@ -25,8 +25,10 @@ $files = array(); // If a type other than directory is requested first load them. if($mimetypes && !in_array('httpd/unix-directory', $mimetypes)) { foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, 'httpd/unix-directory' ) as $file ) { + $file['directory'] = $dir; + $file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']); $file["date"] = OCP\Util::formatDate($file["mtime"]); - $file['mimetype_icon'] = \mimetype_icon('dir'); + $file['mimetype_icon'] = \OCA\files\lib\Helper::determineIcon($file); $files[] = $file; } } @@ -34,23 +36,19 @@ if($mimetypes && !in_array('httpd/unix-directory', $mimetypes)) { if (is_array($mimetypes) && count($mimetypes)) { foreach ($mimetypes as $mimetype) { foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, $mimetype ) as $file ) { + $file['directory'] = $dir; + $file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']); $file["date"] = OCP\Util::formatDate($file["mtime"]); - if ($file['type'] === "dir") { - $file['mimetype_icon'] = \mimetype_icon('dir'); - } else { - $file['mimetype_icon'] = \mimetype_icon($file['mimetype']); - } + $file['mimetype_icon'] = \OCA\files\lib\Helper::determineIcon($file); $files[] = $file; } } } else { foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $file ) { + $file['directory'] = $dir; + $file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']); $file["date"] = OCP\Util::formatDate($file["mtime"]); - if ($file['type'] === "dir") { - $file['mimetype_icon'] = \mimetype_icon('dir'); - } else { - $file['mimetype_icon'] = \mimetype_icon($file['mimetype']); - } + $file['mimetype_icon'] = \OCA\files\lib\Helper::determineIcon($file); $files[] = $file; } } |