From 45f296f1872e7613a9dc1437046acae4eb8ed11d Mon Sep 17 00:00:00 2001 From: Lloric Mayuga Garcia Date: Sun, 21 May 2017 21:21:57 +0800 Subject: add pre tag in config and session when array --- system/libraries/Profiler.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 9ea09a529..9a1a51380 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -484,13 +484,19 @@ class CI_Profiler { foreach ($this->CI->config->config as $config => $val) { + $pre = ''; + $pre_close = ''; + if (is_array($val) OR is_object($val)) { $val = print_r($val, TRUE); + + $pre = '
' ;
+                                $pre_close = '
'; } $output .= '' - .$config.'  '.htmlspecialchars($val, ENT_QUOTES, config_item('charset'))."\n"; + .$config.'  '.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; @@ -516,13 +522,19 @@ class CI_Profiler { foreach ($this->CI->session->userdata() as $key => $val) { + $pre = ''; + $pre_close = ''; + if (is_array($val) OR is_object($val)) { $val = print_r($val, TRUE); + + $pre = '
' ;
+                                $pre_close = '
'; } $output .= '' - .$key.'  '.htmlspecialchars($val, ENT_QUOTES, config_item('charset'))."\n"; + .$key.'  '.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; -- cgit v1.2.3-24-g4f1b From b344273d2aa61457d0119f0b224d400b8de65654 Mon Sep 17 00:00:00 2001 From: Lloric Mayuga Garcia Date: Sun, 9 Jul 2017 22:19:19 +0800 Subject: php style Signed-off-by: Lloric Mayuga Garcia --- system/libraries/Profiler.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'system') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 9a1a51380..cb3eaed75 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -484,15 +484,15 @@ class CI_Profiler { foreach ($this->CI->config->config as $config => $val) { - $pre = ''; - $pre_close = ''; + $pre = ''; + $pre_close = ''; if (is_array($val) OR is_object($val)) { $val = print_r($val, TRUE); - $pre = '
' ;
-                                $pre_close = '
'; + $pre = '
' ;
+ 				$pre_close = '
'; } $output .= '' @@ -522,15 +522,15 @@ class CI_Profiler { foreach ($this->CI->session->userdata() as $key => $val) { - $pre = ''; - $pre_close = ''; + $pre = ''; + $pre_close = ''; if (is_array($val) OR is_object($val)) { $val = print_r($val, TRUE); - $pre = '
' ;
-                                $pre_close = '
'; + $pre = '
' ;
+ 				$pre_close = '
'; } $output .= '' -- cgit v1.2.3-24-g4f1b