=== modified file 'uc_catalog/uc_catalog.module' --- uc_catalog/uc_catalog.module 2007-07-11 20:37:03 +0000 +++ uc_catalog/uc_catalog.module 2007-07-11 20:59:15 +0000 @@ -605,8 +605,8 @@ function theme_uc_catalog_browse(){ $order = 'n.title'; } $product_types = array_keys(uc_product_node_info()); - $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid = %d AND n.status = 1 AND n.type IN ("'. implode('","', $product_types) .'") ORDER BY '. $order; - $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid RIGHT JOIN {uc_products} AS p ON n.nid = p.nid WHERE tn.tid = %d AND n.status = 1 AND n.type IN ("'. implode('","', $product_types) .'")'; + $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid INNER JOIN {uc_products} AS p ON n.nid = p.nid WHERE tn.tid = %d AND n.status = 1 AND n.type IN ("'. implode('","', $product_types) .'") ORDER BY '. $order; + $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid INNER JOIN {uc_products} AS p ON n.nid = p.nid WHERE tn.tid = %d AND n.status = 1 AND n.type IN ("'. implode('","', $product_types) .'")'; $sql = db_rewrite_sql($sql); $sql_count = db_rewrite_sql($sql_count); $catalog->products = array(); === modified file 'uc_product/uc_product.module' --- uc_product/uc_product.module 2007-07-09 15:37:12 +0000 +++ uc_product/uc_product.module 2007-07-11 20:59:15 +0000 @@ -1153,7 +1153,7 @@ function uc_product_administration(){ $order = 'n.title'; } $table_nids = array(); - $result = pager_query(db_rewrite_sql("SELECT n.nid FROM {node} AS n WHERE n.type IN ('". implode("','", array_keys(uc_product_node_info())) ."') ORDER BY ". $order), variable_get('uc_product_nodes_per_page', 10), 0, null); + $result = pager_query(db_rewrite_sql("SELECT n.nid FROM {node} AS n INNER JOIN {uc_products} AS p ON n.nid = p.nid ORDER BY ". $order), variable_get('uc_product_nodes_per_page', 10), 0, null); while ($node = db_fetch_object($result)){ $table_nids[] = $node->nid; }