Commit db548f75 authored by Dries's avatar Dries

- Bugfix, spotted by Gerhard: editing a book page did not update the author.
parent 83a739bd
......@@ -142,7 +142,7 @@ function book_load($node) {
$book = db_fetch_object(db_query('SELECT parent, weight, log FROM {book} WHERE nid = %d', $node->nid));
if (arg(1) == 'edit' && !user_access('administer nodes')) {
if (arg(2) == 'edit' && !user_access('administer nodes')) {
// If a user is about to update a book page, we overload some
// fields to reflect the changes.
if ($user->uid) {
......
......@@ -142,7 +142,7 @@ function book_load($node) {
$book = db_fetch_object(db_query('SELECT parent, weight, log FROM {book} WHERE nid = %d', $node->nid));
if (arg(1) == 'edit' && !user_access('administer nodes')) {
if (arg(2) == 'edit' && !user_access('administer nodes')) {
// If a user is about to update a book page, we overload some
// fields to reflect the changes.
if ($user->uid) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment