aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/diagnostics/languages/en.php4
-rw-r--r--mod/diagnostics/start.php18
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