You are here

function hs_book_hierarchical_select_item_get_label in Hierarchical Select 5.3

Implementation of hook_hierarchical_select_item_get_label().

File

modules/hs_book.module, line 177
Implementation of the Hierarchical Select API for the Book module.

Code

function hs_book_hierarchical_select_item_get_label($item, $params) {
  static $labels = array();
  if (!isset($labels[$item])) {
    $labels[$item] = t(db_result(db_query("SELECT n.title FROM {book} b INNER JOIN {node} n ON b.vid = n.vid WHERE b.nid = %d", $item)));
  }
  return $labels[$item];
}