diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-12 18:35:03 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-12 18:35:03 +0000 |
commit | 116ff3ae92e54c1de9b30344e0417fb87d08175d (patch) | |
tree | 789c86df03046eda119fffcc967656721a6a3162 /mod/diagnostics/actions/download.php | |
parent | c71cfb0a82b4e2d0a1395ba9d3d96b4f9d6a1ebd (diff) | |
download | elgg-116ff3ae92e54c1de9b30344e0417fb87d08175d.tar.gz elgg-116ff3ae92e54c1de9b30344e0417fb87d08175d.tar.bz2 |
Closes #232: Produces a basic report plus checksums of all files in md5sum format.
To add extra information to this report add a plugin hook listening to:
'diagnostics:report'
And append to $returnvalue which is a simple text buffer.
git-svn-id: https://code.elgg.org/elgg/trunk@1863 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/diagnostics/actions/download.php')
-rw-r--r-- | mod/diagnostics/actions/download.php | 24 |
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 |