- Patch #221057 by pwolanin: book module may overwrite another node's link.

merge-requests/26/head
Dries Buytaert 2008-02-14 18:32:14 +00:00
parent 45b0040e55
commit 4b6e9f40bd
1 changed files with 4 additions and 0 deletions

View File

@ -683,6 +683,10 @@ function book_nodeapi(&$node, $op, $teaser, $page) {
if (!empty($node->book['bid']) && !user_access('administer nodes')) {
$node->revision = 1;
}
// Make sure a new node gets a new menu link.
if (empty($node->nid)) {
$node->book['mlid'] = NULL;
}
break;
case 'insert':
case 'update':