--- sites/all/modules/brilliant_gallery/brilliant_gallery.module	2009-01-15 10:40:12.000000000 -0600
+++ sites/all/modules/brilliant_gallery/brilliant_gallery.module	2009-03-17 21:09:47.000000000 -0500
@@ -102,10 +102,10 @@ function brilliant_gallery_checklist_loa
   $dcvals = array();
   // any checkbox id that starts with user- we remember the current user's settings
   // any other id is global and we use user=0
-  $result = db_query("select qid,state from brilliant_gallery_checklist ".
+  $result = db_query("select qid,state from {brilliant_gallery_checklist} ".
     " where nid=%d and qid not like 'user-%' and user=0 ".
     " union ".
-    "select qid,state from brilliant_gallery_checklist ".
+    "select qid,state from {brilliant_gallery_checklist} ".
     "where nid=%d and qid like 'user-%' and user=%d ", $nid, $nid, $uid
   );
   $count = 0;
@@ -127,17 +127,17 @@ function brilliant_gallery_checklist_sav
     $uid = 0;
   }
 
-  $existing = db_result(db_query("select count(state) from brilliant_gallery_checklist ".
+  $existing = db_result(db_query("select count(state) from {brilliant_gallery_checklist} ".
       "where nid=%d and user=%d and qid='%s'", $nid, $uid, $qid
     ));
   if ($existing == 0) {
-    db_query("insert into brilliant_gallery_checklist (nid,user,qid,state) " . "values (%d,%d,'%s',%d)", $nid, $uid, $qid, $state);
+    db_query("insert into {brilliant_gallery_checklist} (nid,user,qid,state) " . "values (%d,%d,'%s',%d)", $nid, $uid, $qid, $state);
   }
   elseif ($current != $state) {
-    $current = db_result(db_query("select state from brilliant_gallery_checklist " . " where nid=%d and user=%d and qid='%s'", $nid, $uid, $qid));
+    $current = db_result(db_query("select state from {brilliant_gallery_checklist} " . " where nid=%d and user=%d and qid='%s'", $nid, $uid, $qid));
 
     if ($current != $state) {
-      db_query("update brilliant_gallery_checklist " . "set state=%d where nid=%d and user=%d and qid='%s'", $state, $nid, $uid, $qid);
+      db_query("update {brilliant_gallery_checklist} " . "set state=%d where nid=%d and user=%d and qid='%s'", $state, $nid, $uid, $qid);
     }
   }
   print drupal_to_js("1");
@@ -649,14 +649,14 @@ function render_brilliant_gallery($thisf
   // any checkbox id that starts with user- we remember the current user's settings
   // any other id is global and we use user=0
   /*
-          $result=db_query("select qid,state from brilliant_gallery_checklist ".
+          $result=db_query("select qid,state from {brilliant_gallery_checklist} ".
                            " where nid='$nid' and qid not like 'user-%' and user=0 ".
                            " union ".
-                           "select qid,state from brilliant_gallery_checklist ".
+                           "select qid,state from {brilliant_gallery_checklist} ".
                            "where nid='$nid' and qid like 'user-%' and user='$uid' ");
           */
 
-  $dbresult = db_query("select qid from brilliant_gallery_checklist where qid like 'user-%' and state='1' ");
+  $dbresult = db_query("select qid from {brilliant_gallery_checklist} where qid like 'user-%' and state='1' ");
   while ($data = db_fetch_object($dbresult)) {
     $excludedimgs[] = $data->qid;
   }
