--- uc_node_published.module    2009-02-16 10:38:28.000000000 +1100
+++ uc_node_published.module_   2009-02-18 23:00:20.000000000 +1100
@@ -13,8 +13,8 @@ function uc_node_published_order($op, &$       foreach ($arg1->products as $item) {
         $node = node_load($item->data['node_checkout_nid']);
         // make sure we only affect uc_node_checkout related items
-        $uc_node_type = db_result(db_query("SELECT `type` FROM `uc_node_checkou
t_types` WHERE `type`='$node->type' ORDER BY `product_nid` DESC LIMIT 1;"));
-        if ($uc_node_type) {+        $types = array_keys(uc_node_checkout_product_map());
+        if (in_array($node->type, $types)) {
           if ($output) { $output .= ', '; }
           $output .= '<strong>'. l($node->title, 'node/'. $node->nid) .'</stron
g>';
           $type = 'node checkout';
@@ -31,8 +31,8 @@ function uc_node_published_order($op, &$         foreach ($arg1->products as $item) {
           $node = node_load($item->data['node_checkout_nid']);
           // make sure we only affect uc_node_checkout related items
-          $uc_node_type = db_result(db_query("SELECT `type` FROM `uc_node_check
out_types` WHERE `type`='$node->type' ORDER BY `product_nid` DESC LIMIT 1;"));
-          if ($uc_node_type) {+          $types = array_keys(uc_node_checkout_product_map());
+          if (in_array($node->type, $types)) {
             if ($output) { $output .= ', '; }
             $output .= '<strong>'. l($node->title, 'node/'. $node->nid) .'</str
ong>';
             $type = 'node checkout';
@@ -49,8 +49,8 @@ function uc_node_published_order($op, &$   case 'delete':
     foreach($arg1->products as $item) {
       $node = node_load($item->data['node_checkout_nid']);
-      $uc_node_type = db_result(db_query("SELECT `type` FROM `uc_node_checkout_
types` WHERE `type`='$node->type' ORDER BY `product_nid` DESC LIMIT 1;"));
-      if ($uc_node_type) {
+      $types = array_keys(uc_node_checkout_product_map());
         node_delete($node->nid);
       }
     }

