You are here

function biblio_handler_field::init in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 views/biblio_handler_field.inc \biblio_handler_field::init()
  2. 7 views/biblio_handler_field.inc \biblio_handler_field::init()
  3. 7.2 views/biblio_handler_field.inc \biblio_handler_field::init()

File

views/biblio_handler_field.inc, line 4

Class

biblio_handler_field

Code

function init(&$view, $options) {
  parent::init($view, $options);
  if (!$this->options['biblio_label']) {
    return;
  }
  $this->definition['click sortable'] = array(
    'default' => TRUE,
  );
  $result = db_query("SELECT bft.tid, bftd.title FROM {biblio_field_type} bft\n            INNER JOIN {biblio_fields} bf ON bft.fid=bf.fid AND bf.name='%s'\n            INNER JOIN {biblio_field_type_data} bftd ON bftd.ftdid=bft.ftdid", $options['field']);
  while ($label = db_fetch_object($result)) {
    $this->labels[$label->tid] = $label->title;
  }
}