Fix opening linked directories gave error instead of opening in filemanager

This commit is contained in:
Nathan Gray 2015-09-02 20:13:51 +00:00
parent f664d58032
commit 26623dac40
3 changed files with 12 additions and 1 deletions

View File

@ -182,6 +182,11 @@ class etemplate_widget_link extends etemplate_widget
$link['title'] = egw_vfs::decodePath($link['title']);
$link['icon'] = egw_link::vfs_path($link['app2'],$link['id2'],$link['id'],true);
$link['download_url'] = egw_vfs::download_url($link['icon']);
// Make links to directories load in filemanager
if($link['type'] == 'httpd/unix-directory')
{
$link['target'] = 'filemanager';
}
}
else
{

View File

@ -272,8 +272,11 @@ class filemanager_hooks
'mime' => array(
egw_vfs::DIR_MIME_TYPE => array(
'menuaction' => 'filemanager.filemanager_ui.index',
'ajax' => 'true',
'mime_id' => 'path',
'mime_target' => '_self',
'mime_target' => 'filemanager',
// Prevent url from changing to webdav
'mime_url' => ''
),
),
'merge' => true,

View File

@ -181,6 +181,9 @@ egw.extend('links', egw.MODULE_GLOBAL, function()
case 'mime_type':
data[mime_info.mime_type] = _type;
break;
case 'mime_id':
data[mime_info.mime_id] = path;
break;
default:
data[attr] = mime_info[attr];
}