|
|
|
@ -26,7 +26,7 @@ $files = array(); |
|
|
|
|
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['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($file['mimetype']); |
|
|
|
|
$file["date"] = OCP\Util::formatDate($file["mtime"]); |
|
|
|
|
$file['mimetype_icon'] = \OCA\files\lib\Helper::determineIcon($file); |
|
|
|
|
$files[] = $file; |
|
|
|
@ -37,7 +37,7 @@ 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['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($file['mimetype']); |
|
|
|
|
$file["date"] = OCP\Util::formatDate($file["mtime"]); |
|
|
|
|
$file['mimetype_icon'] = \OCA\files\lib\Helper::determineIcon($file); |
|
|
|
|
$files[] = $file; |
|
|
|
@ -46,7 +46,7 @@ if (is_array($mimetypes) && count($mimetypes)) { |
|
|
|
|
} else { |
|
|
|
|
foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $file ) { |
|
|
|
|
$file['directory'] = $dir; |
|
|
|
|
$file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']); |
|
|
|
|
$file['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($file['mimetype']); |
|
|
|
|
$file["date"] = OCP\Util::formatDate($file["mtime"]); |
|
|
|
|
$file['mimetype_icon'] = \OCA\files\lib\Helper::determineIcon($file); |
|
|
|
|
$files[] = $file; |
|
|
|
|