--- brilliant_gallery.module.orig 2009-07-03 12:21:56.000000000 -0400 +++ brilliant_gallery.module 2009-07-12 12:02:06.000000000 -0400 @@ -101,10 +101,10 @@ $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; @@ -126,17 +126,17 @@ $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"); @@ -658,14 +658,14 @@ // 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; }