mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Fix opening linked directories gave error instead of opening in filemanager
This commit is contained in:
parent
d5e8935dd2
commit
509d47bbce
@ -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
|
||||
{
|
||||
@ -231,6 +236,7 @@ class etemplate_widget_link extends etemplate_widget
|
||||
|
||||
if(!is_array($files)) $files = array($files);
|
||||
foreach($files as $target) {
|
||||
error_log(array2string($target));
|
||||
egw_link::link_file($app, $id, $target);
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user