You are here

function bookblock_book_info_load in Book Block 6

Same name and namespace in other branches
  1. 7 bookblock.module \bookblock_book_info_load()

comment

1 call to bookblock_book_info_load()
bookblock_block in ./bookblock.module
Implementation of hook_block().

File

./bookblock.module, line 108
Enables users to add specific book navigation blocks on non-book pages.

Code

function bookblock_book_info_load($nid) {
  $book = db_fetch_array(db_query('SELECT * FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = %d', $nid));
  if ($book) {
    $book['href'] = $book['link_path'];
    $book['title'] = $book['link_title'];
    $book['options'] = unserialize($book['options']);
    return $book;
  }
}