book_content

Versions
4.6 – 5
book_content($node, $teaser = FALSE)

▾ 2 functions call book_content()

book_render in modules/book.module
Menu callback; prints a listing of all books.
book_view in modules/book.module
Implementation of hook_view().

Code

modules/book.module, line 374

<?php
function book_content($node, $teaser = FALSE) {
  $op = $_POST['op'];

  // Always display the most recently approved revision of a node
  // (if any) unless we have to display this page in the context of
  // the moderation queue.
  if ($op != t('Preview') && $node->moderate && arg(0) != 'queue') {
    $revision = book_revision_load($node, array('moderate' => 0, 'status' => 1));

    if ($revision) {
      $node = $revision;
    }
  }

  // Extract the page body.
  $node = node_prepare($node, $teaser);

  return $node;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.