6
6
*
7
7
* @package CodeIgniter
8
8
* @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
10
10
* @license http://codeigniter.com/user_guide/license.html
11
- * @linkhttp ://codeigniter.com
11
+ * @linkhttps ://codeigniterpower.github.io/codeigniter-profiler/
12
12
* @since Version 2.0
13
13
* @filesource
14
14
*/
15
15
16
16
// ------------------------------------------------------------------------
17
17
18
18
/**
19
- * CodeIgniter Profiler Class
19
+ * CodeIgniter powered Profiler Class library
20
20
*
21
21
* This class enables you to display benchmark, query, and other data
22
22
* in order to help with debugging and optimization.
28
28
* @subpackage Libraries
29
29
* @category Libraries
30
30
* @author ExpressionEngine Dev Team
31
- * @linkhttp ://codeigniter.com/user_guide/general/profiling.html
31
+ * @linkhttps ://codeigniterpower.github.io/codeigniter-profiler/
32
32
*/
33
33
class CI_Profiler extends CI_Loader {
34
34
@@ -59,7 +59,7 @@ class CI_Profiler extends CI_Loader {
59
59
60
60
public function __construct ($ config = array ())
61
61
{
62
- $ this ->CI =& get_instance ();
62
+ $ this ->CI = & get_instance ();
63
63
$ this ->CI ->load ->language ('profiler ' );
64
64
65
65
// If the config file has a query_toggle_count,
@@ -70,6 +70,13 @@ public function __construct($config = array())
70
70
unset($ config ['query_toggle_count ' ]);
71
71
}
72
72
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 );
73
80
// default all sections to display
74
81
foreach ($ this ->_available_sections as $ section )
75
82
{
@@ -79,14 +86,6 @@ public function __construct($config = array())
79
86
}
80
87
}
81
88
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
-
90
89
// Strange hack to get access to the current
91
90
// vars in the CI_Loader class.
92
91
$ this ->_ci_cached_vars = $ this ->CI ->load ->_ci_cached_vars ;
0 commit comments