--- nodeorder.module 2009-10-27 12:39:14.609375000 -0200 +++ nodeorderNEW.module 2009-10-27 12:37:41.281250000 -0200 @@ -443,7 +443,7 @@ function nodeorder_select_nodes($tids = if ($operator == 'or') { $args = call_user_func_array('array_merge', $descendant_tids); $placeholders = db_placeholders($args, 'int'); - $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM {node} n INNER JOIN {term_node} tn ON n.vid = tn.vid WHERE tn.tid IN ('. $placeholders .') AND n.status = 1 ORDER BY '. $order; + $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created, tn.weight_in_tid FROM {node} n INNER JOIN {term_node} tn ON n.vid = tn.vid WHERE tn.tid IN ('. $placeholders .') AND n.status = 1 ORDER BY '. $order; $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n INNER JOIN {term_node} tn ON n.vid = tn.vid WHERE tn.tid IN ('. $placeholders .') AND n.status = 1'; } else { @@ -455,7 +455,7 @@ function nodeorder_select_nodes($tids = $wheres .= ' AND tn'. $index .'.tid IN ('. db_placeholders($tids, 'int') .')'; $args = array_merge($args, $tids); } - $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres .' ORDER BY '. $order; + $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created, tn0.weight_in_tid FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres .' ORDER BY '. $order; $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres; }