use \OC::$server->getPreviewManager() instead of \OCP\Preview

remotes/origin/stable6
Thomas Müller 11 years ago
parent b9e943f5d5
commit 9b420e8660
  1. 6
      apps/files/ajax/rawlist.php
  2. 2
      apps/files/lib/helper.php
  3. 2
      apps/files_sharing/public.php
  4. 2
      apps/files_trashbin/lib/helper.php

@ -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;

@ -84,7 +84,7 @@ class Helper
}
}
$i['directory'] = $dir;
$i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($i['mimetype']);
$i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($i['mimetype']);
$i['icon'] = \OCA\files\lib\Helper::determineIcon($i);
$files[] = $i;
}

@ -187,7 +187,7 @@ if (isset($path)) {
} else {
$i['extension'] = '';
}
$i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($i['mimetype']);
$i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($i['mimetype']);
}
$i['directory'] = $getPath;
$i['permissions'] = OCP\PERMISSION_READ;

@ -61,7 +61,7 @@ class Helper
$i['directory'] = '';
}
$i['permissions'] = \OCP\PERMISSION_READ;
$i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($r['mime']);
$i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($r['mime']);
$i['icon'] = \OCA\files\lib\Helper::determineIcon($i);
$files[] = $i;
}

Loading…
Cancel
Save