diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index d55b083c68..ee84a7ce0a 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -1831,7 +1831,7 @@ abstract class bo_merge private static function document_mail_action(Array &$action, $file) { unset($action['postSubmit']); - + // Lots takes a while, confirm $action['confirm_multiple'] = lang('Do you want to send the message to all selected entries, WITHOUT further editing?'); @@ -1839,6 +1839,7 @@ abstract class bo_merge $extra = array( 'from=merge', 'document='.$file['path'], + 'merge='.get_called_class() ); // egw.open() used if only 1 row selected diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 725a445be5..d212e9c615 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -1397,7 +1397,9 @@ class mail_compose * Use ajax_merge to merge & send multiple */ // Merge selected ID (in mailtocontactbyid or $mail_id) into given document - $document_merge = new addressbook_merge(); + preg_match('/^([a-z_-]+_merge)$/', $_REQUEST['merge'], $merge_class); + $merge_class = $merge_class[1] ? $merge_class[1] : 'addressbook_merge'; + $document_merge = new $merge_class(); $this->mail_bo->openConnection(); $merge_ids = $_REQUEST['preset']['mailtocontactbyid'] ? $_REQUEST['preset']['mailtocontactbyid'] : $mail_id; $merge_ids = is_array($merge_ids) ? $merge_ids : explode(',',$merge_ids);