Index: uc_upsell.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_upsell/uc_upsell.module,v
retrieving revision 1.7.2.33
diff -u -p -r1.7.2.33 uc_upsell.module
--- uc_upsell.module	3 Jan 2010 23:49:25 -0000	1.7.2.33
+++ uc_upsell.module	10 Jan 2011 13:40:55 -0000
@@ -147,8 +147,9 @@ function uc_upsell_filter_types($array) 
   $config = uc_upsell_get_config();
 
   foreach ($array as $product => $type) {
-    $status = db_result(db_query("SELECT `status` FROM {node} WHERE nid = %d", $product));
-    if (!in_array($type, uc_upsell_get_config_types()) || $status == 0) {
+    $node = node_load($product);
+    $node_access = node_access("view",$node);
+    if (!in_array($type, uc_upsell_get_config_types()) || $node_access == 0) {
       unset($array[$product]);
     }
   }
