mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
document merge helper function to allow download by HTTP POST request
This commit is contained in:
parent
bf66b8348f
commit
2fbf1d36e8
@ -23,6 +23,7 @@ class calendar_merge extends bo_merge
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $public_functions = array(
|
var $public_functions = array(
|
||||||
|
'download_by_request' => true,
|
||||||
'show_replacements' => true,
|
'show_replacements' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1453,6 +1453,30 @@ abstract class bo_merge
|
|||||||
common::egw_exit();
|
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
|
* Get a list of document actions / files from the given directory
|
||||||
*
|
*
|
||||||
|
@ -23,6 +23,7 @@ class infolog_merge extends bo_merge
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $public_functions = array(
|
var $public_functions = array(
|
||||||
|
'download_by_request' => true,
|
||||||
'show_replacements' => true,
|
'show_replacements' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user