diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-13 21:50:37 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-13 21:50:37 +0000 |
commit | 2d508007f90be53f1895f284844ba1e1d52ac14c (patch) | |
tree | a6c12cbd7edcf2ee932ff9fd0fa6d92f64ad729a | |
parent | 3f60f939e129d3a63adb16fe0dda66823ce161d7 (diff) | |
download | elgg-2d508007f90be53f1895f284844ba1e1d52ac14c.tar.gz elgg-2d508007f90be53f1895f284844ba1e1d52ac14c.tar.bz2 |
Added session to diagnostics.
git-svn-id: https://code.elgg.org/elgg/trunk@1911 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | mod/diagnostics/languages/en.php | 4 | ||||
-rw-r--r-- | mod/diagnostics/start.php | 18 |
2 files changed, 22 insertions, 0 deletions
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 @@ -28,6 +28,10 @@ Generated %s by %s 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 |