Indicate merge class to use for mail, fixes infolog placeholders not known

This commit is contained in:
Nathan Gray 2014-08-12 16:58:07 +00:00
parent 5544c63b34
commit 694a63d1f4
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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);