/** * Print all child pages of a book. */ function tao_print_book_children($node) { // Book recursive printing if (module_exists('book') && book_type_is_allowed($node->type)) { if (isset($_GET['print']) && isset($_GET['book_recurse'])) { $child_pages = ''; $zomglimit = 0; $tree = array_shift(book_menu_subtree_data($node->book)); if (!empty($tree['below'])) { foreach ($tree['below'] as $link) { _tao_print_book_children($link, $child_pages, $zomglimit); } } return $child_pages; } } }
/** * Print all child pages of a book. */ function tao_print_book_children($node) { // We use a semaphore here since this function calls and is called by the // node_view() stack so that it may be called multiple times for a single book tree. static $semaphore; if (module_exists('book') && book_type_is_allowed($node->type)) { if (isset($_GET['print']) && isset($_GET['book_recurse']) && !isset($semaphore)) { $semaphore = TRUE; $child_pages = ''; $zomglimit = 0; $tree = array_shift(book_menu_subtree_data($node->book)); if (!empty($tree['below'])) { foreach ($tree['below'] as $link) { _tao_print_book_children($link, $child_pages, $zomglimit); } } unset($semaphore); return $child_pages; } } return ''; }