diff options
author | Andrey Andreev <narf@devilix.net> | 2017-07-10 13:40:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-10 13:40:06 +0200 |
commit | 3b943589b3d78731460895c7f02886bebdb76b45 (patch) | |
tree | fa2eb1cf12d177b93d0b0e92844d513bff8f6de4 | |
parent | aa8ca65ac7ca3afda3331a5da16297e7afeeecbe (diff) | |
parent | b344273d2aa61457d0119f0b224d400b8de65654 (diff) |
[ci skip] Merge pull request #5128 from lloricode/profiler-pre-tag
Profiler add pre tag
-rw-r--r-- | system/libraries/Profiler.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 9ea09a529..cb3eaed75 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>' ; + $pre_close = '</pre>'; } $output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">' - .$config.' </td><td style="padding:5px;color:#000;background-color:#ddd;">'.htmlspecialchars($val, ENT_QUOTES, config_item('charset'))."</td></tr>\n"; + .$config.' </td><td style="padding:5px;color:#000;background-color:#ddd;">'.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."</td></tr>\n"; } return $output."</table>\n</fieldset>"; @@ -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>' ; + $pre_close = '</pre>'; } $output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">' - .$key.' </td><td style="padding:5px;color:#000;background-color:#ddd;">'.htmlspecialchars($val, ENT_QUOTES, config_item('charset'))."</td></tr>\n"; + .$key.' </td><td style="padding:5px;color:#000;background-color:#ddd;">'.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."</td></tr>\n"; } return $output."</table>\n</fieldset>"; |