From 23f029cfcd1aa636a1ef74caf8c038d53dc23fab Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 17 Nov 2014 22:53:23 +0000 Subject: [PATCH] Get thumbnails working for filemanager links --- home/inc/class.home_list_portlet.inc.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/home/inc/class.home_list_portlet.inc.php b/home/inc/class.home_list_portlet.inc.php index 98df0353df..3b5bb7d8a1 100644 --- a/home/inc/class.home_list_portlet.inc.php +++ b/home/inc/class.home_list_portlet.inc.php @@ -60,6 +60,17 @@ class home_list_portlet extends home_portlet { $this->title = $context['title']; } + foreach($context['list'] as &$item) + { + if($item['app'] == 'filemanager' || $item['app'] == 'file') + { + $item['app'] = 'file'; + $item['type'] = egw_vfs::mime_content_type($item['id']); + + // Always reload... + $need_reload = true; + } + } $this->context = $context; } @@ -103,8 +114,8 @@ class home_list_portlet extends home_portlet // Filemanager support - links need app = 'file' and type set foreach($content['list'] as &$list) { - if($list['app'] == 'file') $list['app'] = 'filemanager'; - if($list['app'] == 'filemanager') + if($list['app'] == 'filemanager') $list['app'] = 'file'; + if($list['app'] == 'file') { $list['app'] = 'file'; $list['path'] = $list['title'] = $list['icon'] = $list['id'];