From 34d601b102c768be06d1a2478e328bc58b4b059a Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 2 Jul 2021 12:04:38 -0600 Subject: [PATCH] Api: Fix missed change in nested document actions see 186e03671a75d308968b32eefc39c7fbd1e5b04d --- api/src/Storage/Merge.php | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index 26883d552b..64c38ce74f 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -2137,6 +2137,13 @@ abstract class Merge } foreach($files as $file) { + $edit_attributes = array( + 'menuaction' => $GLOBALS['egw_info']['flags']['currentapp'].'.'.get_called_class().'.merge_entries', + 'document' => $file['path'], + 'merge' => get_called_class(), + 'id' => '$id', + 'select_all' => '$select_all' + ); if (count($dircount) > 1) { $name_arr = explode('/', $file['name']); @@ -2159,6 +2166,7 @@ abstract class Merge 'caption' => Api\Vfs::decodePath($name_arr[$count]), 'group' => 2, 'postSubmit' => true, // download needs post submit (not Ajax) to work + 'url' => urldecode(http_build_query($edit_attributes)) ); if ($file['mime'] == 'message/rfc822') { @@ -2197,13 +2205,6 @@ abstract class Merge 'target' => '_blank', 'postSubmit' => true, // download needs post submit (not Ajax) to work ); - $edit_attributes = array( - 'menuaction' => $GLOBALS['egw_info']['flags']['currentapp'].'.'.get_called_class().'.merge_entries', - 'document' => $file['path'], - 'merge' => get_called_class(), - 'id' => '$id', - 'select_all' => '$select_all' - ); $documents[$file['mime']]['children'][$prefix.$file['name']]['url'] = urldecode(http_build_query($edit_attributes)); if ($file['mime'] == 'message/rfc822') { @@ -2218,14 +2219,6 @@ abstract class Merge 'group' => 2, 'target' => '_blank' ); - - $edit_attributes = array( - 'menuaction' => $GLOBALS['egw_info']['flags']['currentapp'].'.'.get_called_class().'.merge_entries', - 'document' => $file['path'], - 'merge' => get_called_class(), - 'id' => '$id', - 'select_all' => '$select_all' - ); $documents[$prefix.$file['name']]['url'] = urldecode(http_build_query($edit_attributes)); if ($file['mime'] == 'message/rfc822') {