only print debug info to users with proper permission ... nice for those who can...
authormoshe weitzman
Thu, 1 Apr 2004 18:30:51 +0000 (18:30 +0000)
committermoshe weitzman
Thu, 1 Apr 2004 18:30:51 +0000 (18:30 +0000)
devel.module

index 6eedc0d..4dd244c 100644 (file)
@@ -98,14 +98,18 @@ function devel_query_table($queries, $counts) {
 
 // handy pretty print of arrays and objects. like var_dump()
 function dprint_r($arr) {
-  print "<pre>";
-  print_r($arr);
-  print "</pre>";
+  if (user_access('access devel information')) {
+    print "<pre>";
+    print_r($arr);
+    print "</pre>";
+  }
 } 
 
 // handy pretty print of call stack. no xdebug dependency
 function ddebug_backtrace() {
-  dprint_r(debug_backtrace());
+  if (user_access('access devel information')) {
+    dprint_r(debug_backtrace());
+  }
 }
 
 function  devel_help($section) {