In nodeapi load a query is done whether it is a book node or not. This was reported for d7 and d6 too (http://drupal.org/node/251239) and committed to head. For 5 it needs a different approach though because since 6 all node types can be a book page.
Corrected to:
function book_nodeapi(&$node, $op, $teaser, $page) {
switch ($op) {
case 'load':
if ($node->type == 'book') {
return db_fetch_array(db_query('SELECT parent, weight FROM {book} WHERE vid = %d', $node->vid));
}
| Comment | File | Size | Author |
|---|---|---|---|
| book_nodeapi_load_5.x.patch | 596 bytes | R.Muilwijk |
Comments
Comment #1
drummA node of any type can be put in the book outline in Drupal 5, there is no configuration for types which can or can't be in the book outline, everything can.