summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormoshe weitzman2007-12-12 21:42:06 (GMT)
committer moshe weitzman2007-12-12 21:42:06 (GMT)
commit6115f4e238e145d1388f830ca8f189560e1b35c4 (patch)
tree71162df3786a8d09941f4b5a841f289affda80d3
parentee5569ace1282272b87208d788e063f59451f766 (diff)
#199418 krumo breaks dsm(). patch by moshe weitzman.
-rw-r--r--devel.module29
1 files changed, 10 insertions, 19 deletions
diff --git a/devel.module b/devel.module
index f7c3fed..dc7ded3 100644
--- a/devel.module
+++ b/devel.module
@@ -1355,7 +1355,7 @@ function dpm($input, $name = NULL) {
*/
function dvm($input, $name = NULL) {
if (user_access('access devel information')) {
- $export = dprint_r($input, TRUE, $name, 'var_dump');
+ $export = dprint_r($input, TRUE, $name, 'var_dump', FALSE);
drupal_set_message($export);
}
}
@@ -1376,7 +1376,7 @@ function dpr($input, $return = FALSE, $name = NULL) {
* Like dpr, but uses var_dump() instead
*/
function dvr($input, $return = FALSE, $name = NULL) {
- return dprint_r($input, $return, $name, 'var_dump');
+ return dprint_r($input, $return, $name, 'var_dump', FALSE);
}
function kprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r') {
@@ -1386,7 +1386,7 @@ function kprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r')
}
}
else {
- return dprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r');
+ return dprint_r($input, $return = FALSE, $name = NULL, 'print_r');
}
}
@@ -1396,17 +1396,20 @@ function kprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r')
* Displays only for users with proper permissions. If
* you want a string returned instead of a print, use the 2nd param.
*/
-function dprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r') {
+function dprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r', $check= TRUE) {
if (user_access('access devel information')) {
if ($name) {
$name .= ' => ';
}
ob_start();
$function($input);
- $output = check_plain(ob_get_clean());
+ $output = ob_get_clean();
+ if ($check) {
+ $output = check_plain($output);
+ }
if (count($input, COUNT_RECURSIVE) > DEVEL_MIN_TEXTAREA) {
if (has_krumo()) {
- krumo($output);
+ $printed_value = krumo_ob($input);
}
else {
// don't use fapi here because sometimes fapi will not be loaded
@@ -1416,6 +1419,7 @@ function dprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r')
else {
$printed_value = '<pre>' . $name . $output . '</pre>';
}
+
if ($return) {
return $printed_value;
}
@@ -1426,19 +1430,6 @@ function dprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r')
}
/**
- *
- */
-function dkr($input, $return = FALSE, $name = NULL) {
- require_once './'. drupal_get_path('module', 'devel'). '/krumo/class.krumo.php';
- if ($return) {
- ob_start();
- krumo($input);
- $output = check_plain(ob_get_clean());
- }
- dprint_r($input, $return, $name, 'krumo', TRUE);
-}
-
-/**
* Print the function call stack.
*/
function ddebug_backtrace() {