Skip to content

Commit defc863

Browse files
committed
fix loading of console library and ajust copyright
1 parent 1647cf1 commit defc863

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

libraries/Profiler.php

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
*
77
* @package CodeIgniter
88
* @author ExpressionEngine Dev Team
9-
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
9+
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. 2016 lionell, 2020 PICCORO Lenz McKAY
1010
* @license http://codeigniter.com/user_guide/license.html
11-
* @linkhttp://codeigniter.com
11+
* @linkhttps://codeigniterpower.github.io/codeigniter-profiler/
1212
* @since Version 2.0
1313
* @filesource
1414
*/
1515

1616
// ------------------------------------------------------------------------
1717

1818
/**
19-
* CodeIgniter Profiler Class
19+
* CodeIgniter powered Profiler Class library
2020
*
2121
* This class enables you to display benchmark, query, and other data
2222
* in order to help with debugging and optimization.
@@ -28,7 +28,7 @@
2828
* @subpackage Libraries
2929
* @category Libraries
3030
* @author ExpressionEngine Dev Team
31-
* @linkhttp://codeigniter.com/user_guide/general/profiling.html
31+
* @linkhttps://codeigniterpower.github.io/codeigniter-profiler/
3232
*/
3333
class CI_Profiler extends CI_Loader {
3434

@@ -59,7 +59,7 @@ class CI_Profiler extends CI_Loader {
5959

6060
public function __construct($config = array())
6161
{
62-
$this->CI =& get_instance();
62+
$this->CI = &get_instance();
6363
$this->CI->load->language('profiler');
6464

6565
// If the config file has a query_toggle_count,
@@ -70,6 +70,13 @@ public function __construct($config = array())
7070
unset($config['query_toggle_count']);
7171
}
7272

73+
// Make sure the Console is loaded.
74+
if (!class_exists('Console'))
75+
{
76+
$this->CI->load->library('Console');
77+
}
78+
79+
$this->set_sections($config);
7380
// default all sections to display
7481
foreach ($this->_available_sections as $section)
7582
{
@@ -79,14 +86,6 @@ public function __construct($config = array())
7986
}
8087
}
8188

82-
// Make sure the Console is loaded.
83-
if (!class_exists('Console'))
84-
{
85-
$this->CI->load->library('Console');
86-
}
87-
88-
$this->set_sections($config);
89-
9089
// Strange hack to get access to the current
9190
// vars in the CI_Loader class.
9291
$this->_ci_cached_vars = $this->CI->load->_ci_cached_vars;

0 commit comments

Comments
 (0)