Index: devel.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/devel/devel.module,v
retrieving revision 1.49
diff -U3 -r1.49 devel.module
--- devel.module	25 Apr 2005 04:22:41 -0000	1.49
+++ devel.module	26 Apr 2005 17:22:02 -0000
@@ -32,13 +32,13 @@
       'access' => user_access('access devel information'));
     $items[] = array('path' => 'devel/variable', 'title' => t('variable viewer'),
       'callback' => 'devel_variable',
-      'access' => user_access('access devel information'));  
+      'access' => user_access('access devel information'));
   }
 
   return $items;
 }
 
-function devel_variable() {                    
+function devel_variable() {
   global$conf;
   return dprint_r($conf);
 }
@@ -60,10 +60,14 @@
 function devel_exit($destination = NULL) {
   global $queries;
 
+  $dev_timer    = isset($_GET['dev_timer']) ? (int) $_GET['dev_timer'] : variable_get('dev_timer', 0);
+  $dev_query    = isset($_GET['dev_query']) ? (int) $_GET['dev_query'] : variable_get('dev_query', 0);
+  $dev_redirect = isset($_GET['dev_redirect']) ? (int) $_GET['dev_redirect'] : variable_get('devel_redirect_page', 0);
+
   if (isset($destination)) {
     // The page we are leaving is a drupal_goto(). Present a redirection page
     // so that the developer can see the intermediate query log.
-    if (user_access('access devel information') && variable_get('devel_redirect_page', 0)) {
+    if (user_access('access devel information') && $dev_redirect) {
       $output = t('<p>The user is being redirected to %destination.</p>', array('%destination' => "<em><a href=\"$destination\">$destination</a></em>"));
       return $output;
 
@@ -82,12 +86,12 @@
   };
   if (user_access('access devel information') && !$is_xml) { // try not to break the xml pages
     // Query log off, timer on
-    if (!variable_get('dev_query', 0) && variable_get('dev_timer', 0)) {
+    if (!$dev_query && $dev_timer) {
       $output = '<div style="padding-top: 4em;">'. devel_timer() .'</div>';
     }
 
     // Query log on
-    if (variable_get('dev_query', 0)) {
+    if ($dev_query) {
       foreach ($queries as $query) {
         $text[] = $query[0];
         $sum += $query[1];
@@ -98,7 +102,7 @@
       $txt = strtr('Executed %queries queries in %time microseconds.', array('%queries' => count($queries), '%time' => round($sum * 1000, 2)));
       if (function_exists('theme_table')) {
         $txt .= strtr(' Queries taking longer than %threshhold ms, and queries executed more than once, are <span class="marker">highlighted</span>.', array('%threshhold' => variable_get('devel_execution', 5)));
-        if (variable_get('dev_timer', 0)) { $txt .= devel_timer(); }
+        if ($dev_timer) { $txt .= devel_timer(); }
         $output .= $txt. devel_query_table($queries, $counts);
       }
       else {
