aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-02-19 15:08:05 +0100
committerRobin Appelman <icewind@owncloud.com>2014-02-19 15:08:05 +0100
commitf33d35cd073addb08c78a65b719c72eb5424434a (patch)
treea099d5032f070da79fd78ab11669d907b592031a /apps
parent609a91a9b1bbee423a6bda2420dc4010b46757f6 (diff)
downloadnextcloud-server-f33d35cd073addb08c78a65b719c72eb5424434a.tar.gz
nextcloud-server-f33d35cd073addb08c78a65b719c72eb5424434a.zip
Fix svg icons for public shares and external/shared files
Diffstat (limited to 'apps')
-rw-r--r--apps/files/lib/helper.php6
-rw-r--r--apps/files_sharing/public.php3
2 files changed, 5 insertions, 4 deletions
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index fec1297b180..b9e41a352bc 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -22,6 +22,7 @@ class Helper
public static function determineIcon($file) {
if($file['type'] === 'dir') {
$dir = $file['directory'];
+ $icon = \OC_Helper::mimetypeIcon('dir');
$absPath = \OC\Files\Filesystem::getView()->getAbsolutePath($dir.'/'.$file['name']);
$mount = \OC\Files\Filesystem::getMountManager()->find($absPath);
if (!is_null($mount)) {
@@ -29,14 +30,13 @@ class Helper
if (!is_null($sid)) {
$sid = explode(':', $sid);
if ($sid[0] === 'shared') {
- return \OC_Helper::mimetypeIcon('dir-shared');
+ $icon = \OC_Helper::mimetypeIcon('dir-shared');
}
if ($sid[0] !== 'local' and $sid[0] !== 'home') {
- return \OC_Helper::mimetypeIcon('dir-external');
+ $icon = \OC_Helper::mimetypeIcon('dir-external');
}
}
}
- $icon = \OC_Helper::mimetypeIcon('dir');
}else{
if($file['isPreviewAvailable']) {
$pathForPreview = $file['directory'] . '/' . $file['name'];
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index e7a5f5024b8..fe61dd4d5a0 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -32,7 +32,8 @@ function determineIcon($file, $sharingRoot, $sharingToken) {
if($file['isPreviewAvailable']) {
return OCP\publicPreview_icon($relativePath, $sharingToken) . '&c=' . $file['etag'];
}
- return OCP\mimetype_icon($file['mimetype']);
+ $icon = OCP\mimetype_icon($file['mimetype']);
+ return substr($icon, 0, -3) . 'svg';
}
if (isset($_GET['t'])) {