You are here

function biblio_type_add in Bibliography Module 5

1 string reference to 'biblio_type_add'
biblio_menu in ./biblio.module
Implementation of hook_menu().

File

./biblio.module, line 1321

Code

function biblio_type_add($tid = 0, $fid = 0) {
  $result = db_query("SELECT fid,title,weight,required,hint FROM {biblio_fields} WHERE fid=%d", $fid);
  if ($fld = db_fetch_object($result)) {
    db_query("INSERT INTO {biblio_type_details} (tid, fid, title, weight, required, hint)\n                   VALUES (%d,%d,'%s',%d,%d,'%s')", $tid, $fid, $fld->title, $fld->weight, $fld->required, $fld->hint);
  }
  drupal_goto("admin/settings/biblio/types/edit/{$tid}");
}