diff --git a/calendar/inc/class.calendar_merge.inc.php b/calendar/inc/class.calendar_merge.inc.php index a517ee2a73..8ea0d01ee7 100644 --- a/calendar/inc/class.calendar_merge.inc.php +++ b/calendar/inc/class.calendar_merge.inc.php @@ -23,7 +23,8 @@ class calendar_merge extends bo_merge * @var array */ var $public_functions = array( - 'show_replacements' => true, + 'download_by_request' => true, + 'show_replacements' => true, ); // Object for getting calendar info diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index a7dc6dc5c2..2b7e68fd4d 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -1452,6 +1452,30 @@ abstract class bo_merge } common::egw_exit(); } + + /** + * Download document merged with contact(s) + * frontend for HTTP POST requests + * accepts POST vars and calls internal function download() + * string data_document_name: the document name + * string data_document_dir: the document vfs directory + * string data_checked: contact id(s) to merge with (can be comma separated) + * + * @return string with error-message on error, otherwise it does NOT return + */ + public function download_by_request() + { + if(empty($_POST['data_document_name'])) return false; + if(empty($_POST['data_document_dir'])) return false; + if(empty($_POST['data_checked'])) return false; + + return $this->download( + $_POST['data_document_name'], + explode(',',$_POST['data_checked']), + '', + $_POST['data_document_dir'] + ); + } /** * Get a list of document actions / files from the given directory diff --git a/infolog/inc/class.infolog_merge.inc.php b/infolog/inc/class.infolog_merge.inc.php index 43b70d8bdf..a410444b09 100644 --- a/infolog/inc/class.infolog_merge.inc.php +++ b/infolog/inc/class.infolog_merge.inc.php @@ -23,6 +23,7 @@ class infolog_merge extends bo_merge * @var array */ var $public_functions = array( + 'download_by_request' => true, 'show_replacements' => true, );