diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-05-21 20:10:40 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-05-21 20:10:40 -0400 |
commit | a060d31f0aa8721de8afd33edd6abf2ff2825852 (patch) | |
tree | d260fc3563ece21f19653b73b8427e6d3c319329 /modules/book | |
parent | a73fabfacda8cf00afa7831d2e30629f4537b36d (diff) | |
download | brdo-a060d31f0aa8721de8afd33edd6abf2ff2825852.tar.gz brdo-a060d31f0aa8721de8afd33edd6abf2ff2825852.tar.bz2 |
- Patch #1013864 by agentrickard, JimmyAx: book navigation block fails with Node Access modules.
Diffstat (limited to 'modules/book')
-rw-r--r-- | modules/book/book.module | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/book/book.module b/modules/book/book.module index 82d38f713..de9561fec 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -279,10 +279,10 @@ function book_block_view($delta = '') { } elseif ($current_bid) { // Only display this block when the user is browsing a book. - $select = db_select('node'); - $select->addField('node', 'title'); - $select->condition('nid', $node->book['bid']); - $select->addTag('node_access'); + $select = db_select('node', 'n') + ->fields('n', array('title')) + ->condition('nid', $node->book['bid']) + ->addTag('node_access'); $title = $select->execute()->fetchField(); // Only show the block if the user has view access for the top-level node. if ($title) { |