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) {
// hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter().
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.
$element += array(
'#access' => FALSE,
......
......@@ -190,6 +190,9 @@ class BlockTestCase extends DrupalWebTestCase {
$this->drupalLogout();
$this->drupalGet('');
$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 = '') {
$book_menus[$book_id] = menu_tree_output($pseudo_tree);
}
}
$book_menus['#theme'] = 'book_all_books_block';
$block['content'] = $book_menus;
if ($block['content'] = $book_menus) {
$book_menus['#theme'] = 'book_all_books_block';
}
}
elseif ($current_bid) {
// 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