diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-12-23 14:32:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-12-23 14:32:08 +0000 |
commit | 0bac8dad8da331391e775eba5fa3443ec67c3cfa (patch) | |
tree | cd0d05dbee8bb1135dbbc98e3da209098b1c848d /modules/book/book.module | |
parent | 31e791b9a476c2a0e3d87593f30448f067b14c2f (diff) | |
download | brdo-0bac8dad8da331391e775eba5fa3443ec67c3cfa.tar.gz brdo-0bac8dad8da331391e775eba5fa3443ec67c3cfa.tar.bz2 |
- Patch #302207 by John Morahan et al: updated book module to new DB layer.
Diffstat (limited to 'modules/book/book.module')
-rw-r--r-- | modules/book/book.module | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/book/book.module b/modules/book/book.module index 64da2a5a9..38a10a84e 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -561,7 +561,7 @@ function book_update_bid($book_link) { if ($mlids) { db_update('book') - ->fields(array('bid', $book_link['bid'])) + ->fields(array('bid' => $book_link['bid'])) ->condition('mlid', $mlids, 'IN') ->execute(); } @@ -760,6 +760,10 @@ function book_nodeapi_presave($node) { // Always save a revision for non-administrators. if (!empty($node->book['bid']) && !user_access('administer nodes')) { $node->revision = 1; + // The database schema requires a log message for every revision. + if (!isset($node->log)) { + $node->log = ''; + } } // Make sure a new node gets a new menu link. if (empty($node->nid)) { |