summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Output.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index ad92accd6..0dcf2e46f 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -34,6 +34,8 @@ class CI_Output {
var $enable_profiler = FALSE;
var $parse_exec_vars = TRUE; // whether or not to parse variables like {elapsed_time} and {memory_usage}
+ var $_profiler_sections = array();
+
function CI_Output()
{
log_message('debug', "Output Class Initialized");
@@ -143,6 +145,25 @@ class CI_Output {
}
// --------------------------------------------------------------------
+
+ /**
+ * Set Profiler Sections
+ *
+ * Allows override of default / config settings for Profiler section display
+ *
+ * @access public
+ * @param array
+ * @return void
+ */
+ function set_profiler_sections($sections)
+ {
+ foreach ($sections as $section => $enable)
+ {
+ $this->_profiler_sections[$section] = ($enable !== FALSE) ? TRUE : FALSE;
+ }
+ }
+
+ // --------------------------------------------------------------------
/**
* Set Cache
@@ -258,7 +279,12 @@ class CI_Output {
if ($this->enable_profiler == TRUE)
{
$CI->load->library('profiler');
-
+
+ if ( ! empty($this->_profiler_sections))
+ {
+ $CI->profiler->set_sections($this->_profiler_sections);
+ }
+
// If the output data contains closing </body> and </html> tags
// we will remove them and add them back after we insert the profile data
if (preg_match("|</body>.*?</html>|is", $output))