aboutsummaryrefslogtreecommitdiff
path: root/mod/diagnostics/actions/download.php
blob: 3c096eb0a297661ea41a64f0fccf77f4141ac0ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
	/**
	 * Elgg diagnostics
	 *
	 * @package ElggDiagnostics
	 */

	admin_gatekeeper();

	$output = elgg_echo('diagnostics:header', array(date('r'), get_loggedin_user()->name));
	$output = elgg_trigger_plugin_hook('diagnostics:report', 'system', null, $output);

	header("Cache-Control: public");
	header("Content-Description: File Transfer");
	header('Content-disposition: attachment; filename=elggdiagnostic.txt');
	header("Content-Type: text/plain");
	header('Content-Length: '. strlen($output));

	echo $output;
	exit;
?>