mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
document merge helper function to allow download by HTTP POST request
This commit is contained in:
parent
bf66b8348f
commit
2fbf1d36e8
@ -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
|
||||
|
@ -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
|
||||
|
@ -23,6 +23,7 @@ class infolog_merge extends bo_merge
|
||||
* @var array
|
||||
*/
|
||||
var $public_functions = array(
|
||||
'download_by_request' => true,
|
||||
'show_replacements' => true,
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user