-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchromephp-support.patch
More file actions
48 lines (47 loc) · 1.8 KB
/
chromephp-support.patch
File metadata and controls
48 lines (47 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git devel.module devel.module
index 47a501f..fb4d5f0 100644
--- devel.module
+++ devel.module
@@ -331,15 +331,24 @@ function devel_init() {
// See http://www.firephp.org/.
// Support Libraries API - http://drupal.org/project/libraries
if (module_exists('libraries')) {
- $path = libraries_get_path('FirePHPCore') . '/lib/FirePHPCore/';
+ $firephp_path = libraries_get_path('FirePHPCore') . '/lib/FirePHPCore/';
+ $chromephp_path = libraries_get_path('chromephp');
}
else {
- $path = './'. drupal_get_path('module', 'devel') .'/FirePHPCore/lib/FirePHPCore/';
+ $firephp_path = './'. drupal_get_path('module', 'devel') .'/FirePHPCore/lib/FirePHPCore/';
+ $chromephp_path = './' . drupal_get_path('module', 'devel') .'/chromephp';
}
- if (file_exists($path .'fb.php')) {
- include_once $path .'fb.php';
- include_once $path .'FirePHP.class.php';
+ // include FirePHP if exists...
+ if (file_exists($firephp_path .'fb.php')) {
+ include_once $firephp_path .'fb.php';
+ include_once $firephp_path .'FirePHP.class.php';
}
+
+ // include ChromePHP if exists...
+ if (file_exists($chromephp_path . '/ChromePhp.php')) {
+ include_once $chromephp_path . '/ChromePhp.php';
+ }
+
// Add CSS for query log if should be displayed.
if (variable_get('devel_query_display', 0)) {
drupal_add_css(drupal_get_path('module', 'devel') .'/devel.css');
@@ -398,6 +407,13 @@ function dfbt($label) {
dfb($label, FirePHP::TRACE);
}
+function dcp() {
+ if (class_exists('ChromePhp') && user_access('access devel information')) {
+ $args = func_get_args();
+ call_user_func_array(array('ChromePhp', 'log'), $args);
+ }
+}
+
/**
* Implements hook_watchdog().
*/