Commit 966be260 authored by catch's avatar catch

Issue #1297370 by moshe weitzman, webchick: Fixed Default installation of D8 shows help region.

parent 27116b08
...@@ -850,7 +850,7 @@ function _block_get_renderable_block($element) { ...@@ -850,7 +850,7 @@ function _block_get_renderable_block($element) {
// hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter(). // hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter().
drupal_alter(array('block_view', "block_view_{$block->module}_{$block->delta}"), $array, $block); drupal_alter(array('block_view', "block_view_{$block->module}_{$block->delta}"), $array, $block);
if (empty($array)) { if (empty($array['content'])) {
// Blocks without content should emit no markup at all. // Blocks without content should emit no markup at all.
$element += array( $element += array(
'#access' => FALSE, '#access' => FALSE,
......
...@@ -190,6 +190,9 @@ class BlockTestCase extends DrupalWebTestCase { ...@@ -190,6 +190,9 @@ class BlockTestCase extends DrupalWebTestCase {
$this->drupalLogout(); $this->drupalLogout();
$this->drupalGet(''); $this->drupalGet('');
$this->assertNoText($title, t('Block was not displayed to anonymous users.')); $this->assertNoText($title, t('Block was not displayed to anonymous users.'));
// Confirm that an empty block is not displayed.
$this->assertNoRaw('block-system-help', t('Empty block not displayed.'));
} }
/** /**
......
...@@ -274,8 +274,9 @@ function book_block_view($delta = '') { ...@@ -274,8 +274,9 @@ function book_block_view($delta = '') {
$book_menus[$book_id] = menu_tree_output($pseudo_tree); $book_menus[$book_id] = menu_tree_output($pseudo_tree);
} }
} }
$book_menus['#theme'] = 'book_all_books_block'; if ($block['content'] = $book_menus) {
$block['content'] = $book_menus; $book_menus['#theme'] = 'book_all_books_block';
}
} }
elseif ($current_bid) { elseif ($current_bid) {
// Only display this block when the user is browsing a book. // Only display this block when the user is browsing a book.
......
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