Same name and namespace in other branches
  1. 7.x modules/book/book.module \book_link_load()

Like menu_link_load(), but adds additional data from the {book} table.

Do not call when loading a node, since this function may call node_load().

File

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

Code

function book_link_load($mlid) {
  if ($item = db_fetch_array(db_query("SELECT * FROM {menu_links} ml INNER JOIN {book} b ON b.mlid = ml.mlid LEFT JOIN {menu_router} m ON m.path = ml.router_path WHERE ml.mlid = %d", $mlid))) {
    _menu_link_translate($item);
    return $item;
  }
  return FALSE;
}