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.php31
1 files changed, 14 insertions, 17 deletions
diff --git a/mod/diagnostics/actions/download.php b/mod/diagnostics/actions/download.php
index a79527f78..97775c92e 100644
--- a/mod/diagnostics/actions/download.php
+++ b/mod/diagnostics/actions/download.php
@@ -1,21 +1,18 @@
<?php
- /**
- * Elgg diagnostics
- *
- * @package ElggDiagnostics
- */
+/**
+ * Elgg diagnostics
+ *
+ * @package ElggDiagnostics
+ */
- admin_gatekeeper();
+$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);
- $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));
- 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;
-?> \ No newline at end of file
+echo $output;
+exit;