* Filemanager: Add an user preference for being able to chose whether opening a merge print document should download it or open it with collabora editor

This commit is contained in:
Hadi Nategh 2018-02-08 14:24:05 +01:00
parent 06ef14c78e
commit 9d5ddc84e2
2 changed files with 10 additions and 1 deletions

View File

@ -1874,7 +1874,8 @@ abstract class Merge
try {
if (class_exists('EGroupware\\collabora\\Bo') &&
$GLOBALS['egw_info']['user']['apps']['collabora'] &&
$discovery = \EGroupware\collabora\Bo::discover()
($discovery = \EGroupware\collabora\Bo::discover()) &&
$GLOBALS['egw_info']['user']['preferences']['filemanager']['merge_open_handler'] != 'download'
)
{
$editable_mimes = $discovery;

View File

@ -261,6 +261,14 @@ class filemanager_hooks
'values' => array_combine(array_keys($editorLink['mime']), array_keys($editorLink['mime'])),
'default' => '',
),
'merge_open_handler' => array(
'type' => 'select',
'label' => lang('Merge print open handler'),
'help' => lang('Defines how to open a merge print documents'),
'name' => 'merge_open_handler',
'values' => array ('download' => lang('download'), 'collabora' => 'Collabora'),
'default' => 'collabora',
)
);
return $settings;