aboutsummaryrefslogtreecommitdiff
path: root/mod/diagnostics/actions
diff options
context:
space:
mode:
Diffstat (limited to 'mod/diagnostics/actions')
-rw-r--r--mod/diagnostics/actions/download.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/mod/diagnostics/actions/download.php b/mod/diagnostics/actions/download.php
new file mode 100644
index 000000000..90266b793
--- /dev/null
+++ b/mod/diagnostics/actions/download.php
@@ -0,0 +1,24 @@
+<?php
+ /**
+ * Elgg diagnostics
+ *
+ * @package ElggDiagnostics
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+ admin_gatekeeper();
+
+ $output = sprintf(elgg_echo('diagnostics:header'), date('r'), $_SESSION['user']->name);
+ $output = trigger_plugin_hook('diagnostics:report', 'all', 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;
+?> \ No newline at end of file