function tripal_pub_sync_pubs

1.x pub_sync.inc tripal_pub_sync_pubs($job_id = NULL)
3 calls to tripal_pub_sync_pubs()
1 string reference to 'tripal_pub_sync_pubs'
tripal_pub_sync_form_submit in tripal_pub/includes/pub_sync.inc

File

tripal_pub/includes/pub_sync.inc, line 38

Code

function tripal_pub_sync_pubs($job_id = NULL) {

  // get the list of pubs that have not yet been synced
  // and ignore the default 'NULL' pub. we don't want
  // to sync that one.
  $sql = "
    SELECT P.*
    FROM chado.pub P
      LEFT JOIN {chado_pub} CP ON CP.pub_id = P.pub_id
    WHERE CP.pub_id IS NULL and NOT P.title = 'NULL'
  ";
  $results = db_query($sql);


  while ($pub = db_fetch_object($results)) {
    $node = tripal_pub_sync_pub($pub);
  }
}