From 76af409a0157f981c145973e5668052621c38415 Mon Sep 17 00:00:00 2001
From: Derek Allard
Date: Sat, 16 Jan 2010 19:20:49 +0000
Subject: adding http headers and config to CI profiler
---
system/language/english/profiler_lang.php | 2 +
system/libraries/Profiler.php | 81 ++++++++++++++++++++++++++++---
user_guide/changelog.html | 1 +
3 files changed, 78 insertions(+), 6 deletions(-)
diff --git a/system/language/english/profiler_lang.php b/system/language/english/profiler_lang.php
index 7c40e3f3e..bf2183004 100644
--- a/system/language/english/profiler_lang.php
+++ b/system/language/english/profiler_lang.php
@@ -8,6 +8,8 @@ $lang['profiler_get_data'] = 'GET DATA';
$lang['profiler_post_data'] = 'POST DATA';
$lang['profiler_uri_string'] = 'URI STRING';
$lang['profiler_memory_usage'] = 'MEMORY USAGE';
+$lang['profiler_config'] = 'CONFIG VARIABLES';
+$lang['profiler_headers'] = 'HTTP HEADERS';
$lang['profiler_no_db'] = 'Database driver is not currently loaded';
$lang['profiler_no_queries'] = 'No queries were run';
$lang['profiler_no_post'] = 'No POST data exists';
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index ec185a1e8..ebadf8610 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -74,16 +74,16 @@ class CI_Profiler {
// be modified. We also might want to make this data available to be logged
$output = "\n\n";
- $output .= '";
+
+ return $output;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Compile config information
+ *
+ * Lists developer config variables
+ *
+ * @access public
+ * @return string
+ */
+ function _compile_config()
+ {
+ $output = "\n\n";
+ $output .= '';
+ $output .= "\n";
+ $output .= '';
+ $output .= "\n";
+
+ $output .= "\n\n\n";
+
+ foreach($this->CI->config->config as $config=>$val)
+ {
+ $output .= "".$config." | ".$val." |
\n";
+ }
+
+ $output .= "
\n";
+ $output .= "";
+
+ $output .= "";
+
+ return $output;
+ }
+
+ // --------------------------------------------------------------------
+
/**
* Run the Profiler
*
@@ -378,7 +446,8 @@ class CI_Profiler {
$output .= $this->_compile_get();
$output .= $this->_compile_post();
$output .= $this->_compile_queries();
-
+ $output .= $this->_compile_config();
+ $output .= $this->_compile_http_headers();
$output .= '';
return $output;
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 0e49bbdce..aef9d71ac 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -70,6 +70,7 @@ SVN Revision:
Added "is_object" into the list of unit tests capable of being run.
Table library will generate an empty cell with a blank string, or NULL value.
Added a parse_string() method to the Parser Class.
+ Added HTTP headers and Config information to the Profiler output.
Database
--
cgit v1.2.3-24-g4f1b