Same name and namespace in other branches
  1. 4.6.x modules/book.module \book_next()
  2. 4.7.x modules/book.module \book_next()
  3. 5.x modules/book/book.module \book_next()
  4. 7.x modules/book/book.module \book_next()

Fetches the menu link for the next page of the book.

File

modules/book/book.module, line 575
Allows users to structure the pages of a site in a hierarchy or outline.

Code

function book_next($book_link) {
  $flat = book_get_flat_menu($book_link);

  // Assigning the array to $flat resets the array pointer for use with each().
  do {
    list($key, $curr) = each($flat);
  } while ($key && $key != $book_link['mlid']);
  if ($key == $book_link['mlid']) {
    return current($flat);
  }
}