You are here

function _epub_links_book in Epub 6

Check if ePub links a book

Parameters

$nid: An integer containing node id.

Return value

On success, the ePub nid; On failure, FALSE.

4 calls to _epub_links_book()
epub_create_file in ./epub.module
Generate an ePub file from a book.
epub_read_access_callback in ./epub.module
Determine whether the user can download an ePub or not.
epub_read_page_callback in ./epub.module
Determine whether the user has to create the ePub or can download it.
epub_read_title_callback in ./epub.module
Determine correct menu title

File

./epub.module, line 509
Provide ePub content type and enable the creation of ePub files from book contents.

Code

function _epub_links_book($nid) {
  $book = db_fetch_object(db_query(db_rewrite_sql("SELECT nid FROM {epub} WHERE bid = %d"), $nid));
  return $book->nid ? $book->nid : FALSE;
}