aboutsummaryrefslogtreecommitdiff
path: root/mod/diagnostics/actions/download.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/diagnostics/actions/download.php')
-rw-r--r--mod/diagnostics/actions/download.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/mod/diagnostics/actions/download.php b/mod/diagnostics/actions/download.php
new file mode 100644
index 000000000..97775c92e
--- /dev/null
+++ b/mod/diagnostics/actions/download.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Elgg diagnostics
+ *
+ * @package ElggDiagnostics
+ */
+
+$output = elgg_echo('diagnostics:header', array(date('r'), elgg_get_logged_in_user_entity()->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;