Closed (fixed)
Project:
Drupal core
Version:
4.6.3
Component:
book.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Nov 2005 at 09:29 UTC
Updated:
16 Dec 2005 at 19:35 UTC
The function book_validate reset book page weight to 0 for non administer users which is incosistent. It shoulb be set to 0 only for new book page but not for updated ones.
I suggest
function book_validate(&$node) {
// Set default values for non-administrators.
if (!user_access('administer nodes')) {
$node->weight = 0;
$node->revision = 1;
}
}
to become
function book_validate(&$node) {
// Set default values for non-administrators.
if (!user_access('administer nodes')) {
if (!isset ($node->weight)) $node->weight = 0;
$node->revision = 1;
}
}
Comments
Comment #1
travischristopher commented1+
this is a pretty critical change, if other users are maintaining books it it can really screw up the weighting system.
Comment #2
jo1ene commentedThis function no longer exists in the book module as quoted anymore (as of 4.7). This is what we have now.
This calls a function in the node module, which deals with the title.
If this problem still exists, let's reopen this for the 4.7 version.