From 2d508007f90be53f1895f284844ba1e1d52ac14c Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 13 Aug 2008 21:50:37 +0000 Subject: Added session to diagnostics. git-svn-id: https://code.elgg.org/elgg/trunk@1911 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/diagnostics/languages/en.php | 4 ++++ mod/diagnostics/start.php | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/mod/diagnostics/languages/en.php b/mod/diagnostics/languages/en.php index 485a1bab0..ff3198393 100644 --- a/mod/diagnostics/languages/en.php +++ b/mod/diagnostics/languages/en.php @@ -27,6 +27,10 @@ Generated %s by %s 'diagnostics:report:basic' => ' Elgg Release %s, version %s +------------------------------------------------------------------------', + 'diagnostics:report:session' => ' +Current session: +%s ------------------------------------------------------------------------', 'diagnostics:report:plugins' => ' Installed plugins and details: diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php index 091e67a20..a9e3828e5 100644 --- a/mod/diagnostics/start.php +++ b/mod/diagnostics/start.php @@ -129,6 +129,23 @@ return $returnvalue; } + /** + * Get some information about the current session + * + * @param unknown_type $hook + * @param unknown_type $entity_type + * @param unknown_type $returnvalue + * @param unknown_type $params + */ + function diagnostics_session_hook($hook, $entity_type, $returnvalue, $params) + { + global $CONFIG; + + $returnvalue .= sprintf(elgg_echo('diagnostics:report:session'), print_r($_SESSION, true)); + + return $returnvalue; + } + // Initialise log browser register_elgg_event_handler('init','system','diagnostics_init'); register_elgg_event_handler('pagesetup','system','diagnostics_pagesetup'); @@ -137,4 +154,5 @@ register_plugin_hook("diagnostics:report", "all", "diagnostics_plugins_hook", 2); // Now the plugins register_plugin_hook("diagnostics:report", "all", "diagnostics_sigs_hook", 1); // Now the signatures + register_plugin_hook("diagnostics:report", "all", "diagnostics_session_hook"); // Session ?> \ No newline at end of file -- cgit v1.2.3