Index: devel.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/devel/devel.module,v
retrieving revision 1.258.2.54
diff -u -p -r1.258.2.54 devel.module
--- devel.module	3 Jun 2009 03:56:44 -0000	1.258.2.54
+++ devel.module	3 Jul 2009 12:35:00 -0000
@@ -1495,9 +1495,9 @@ function devel_query_table($queries, $co
   foreach ($queries as $query) {
     // dprint_r($query);
     $ar = explode("\n", $query[0]);
-    $function=array_shift($ar);
+    $function = array_shift($ar);
     $count = isset($counts[$query[0]]) ? $counts[$query[0]] : 0;
-    $query[0]=join(' ', $ar);
+    $query[0] = implode(' ', $ar);
 
     $diff = round($query[1] * 1000, 2);
     if ($diff > variable_get('devel_execution', 5)) {
@@ -1695,7 +1695,7 @@ function kprint_r($input, $return = FALS
  * 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', $check= TRUE) {
+function dprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r', $check = TRUE) {
   if (user_access('access devel information')) {
     if ($name) {
       $name .= ' => ';
@@ -1801,7 +1801,7 @@ function devel_queries() {
 
   global $db_type;
   if ($db_type == 'pgsql') {
-    $result = pager_query('SELECT q.qid, q.query, q.function , t.* FROM {devel_queries} q INNER JOIN (SELECT t.qid, COUNT(t.qid) AS count,SUM(t.time) AS total_time, AVG(t.time) AS average, STDDEV(t.time) AS stddev FROM {devel_times} t GROUP BY t.qid) AS t ON t.qid=q.qid '. tablesort_sql($header), 30, 0, 'SELECT COUNT(qid) FROM {devel_queries}');
+    $result = pager_query('SELECT q.qid, q.query, q.function , t.* FROM {devel_queries} q INNER JOIN (SELECT t.qid, COUNT(t.qid) AS count, SUM(t.time) AS total_time, AVG(t.time) AS average, STDDEV(t.time) AS stddev FROM {devel_times} t GROUP BY t.qid) AS t ON t.qid = q.qid '. tablesort_sql($header), 30, 0, 'SELECT COUNT(qid) FROM {devel_queries}');
   }
   else {
     $result = pager_query('SELECT q.qid, q.query, q.function, t.*, COUNT(t.qid) AS count, SUM(t.time) AS total_time, AVG(t.time) AS average, STDDEV(t.time) AS stddev FROM {devel_queries} q INNER JOIN {devel_times} t ON q.qid = t.qid GROUP BY t.qid '. tablesort_sql($header), 30, 0, 'SELECT COUNT(qid) FROM {devel_queries}');
@@ -1858,7 +1858,7 @@ function devel_rebuild_node_comment_stat
   $sql = "DELETE FROM {node_comment_statistics}";
   db_query($sql);
 
-  $sql = "INSERT INTO {node_comment_statistics} (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) (select nid, c.timestamp, name, uid, comment_count FROM {comments} c INNER JOIN (SELECT MAX(timestamp) AS timestamp, COUNT(*) AS comment_count FROM {comments} WHERE status=%d GROUP BY nid) as c2 ON c.timestamp=c2.timestamp)";
+  $sql = "INSERT INTO {node_comment_statistics} (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) (select nid, c.timestamp, name, uid, comment_count FROM {comments} c INNER JOIN (SELECT MAX(timestamp) AS timestamp, COUNT(*) AS comment_count FROM {comments} WHERE status = %d GROUP BY nid) as c2 ON c.timestamp = c2.timestamp)";
   db_query($sql, COMMENT_PUBLISHED);
 
   // Insert 0 count records into the node_comment_statistics for nodes that are missing. See comment_enable()
@@ -1873,8 +1873,8 @@ function devel_rebuild_node_comment_stat
  **/
 function sequence_reset($table, $column) {
   $max = db_result(db_query("SELECT MAX($column) FROM {$table}"));
-  $max = ($max ? $max+1 : 2);
-  db_query("UPDATE {sequences} SET id = $max WHERE name='${table}_$column'");
+  $max = ($max ? $max + 1 : 2);
+  db_query("UPDATE {sequences} SET id = $max WHERE name = '${table}_$column'");
 }
 
 /**