Download & Extend

unnecessary query on book's nodeapi load

Project:Drupal core
Version:5.x-dev
Component:book.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (works as designed)

Issue Summary

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));
      }
AttachmentSizeStatusTest resultOperations
book_nodeapi_load_5.x.patch596 bytesIgnored: Check issue status.NoneNone

Comments

#1

Status:needs review» closed (works as designed)

A 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.

nobody click here