Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
1fb4c7e1
Commit
1fb4c7e1
authored
Apr 11, 2013
by
webchick
Browse files
Issue
#1957104
by alexpott: Fixed Empty regions displayed even though they're empty.
parent
7f621ed0
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/block/block.module
View file @
1fb4c7e1
...
...
@@ -350,7 +350,7 @@ function _block_get_renderable_region($list = array()) {
// skip the help block, since we assume that most users do not need or want
// to perform contextual actions on the help block, and the links needlessly
// draw attention on it.
if
(
!
in_array
(
$block
->
get
(
'plugin'
),
array
(
'system_help_block'
,
'system_main_block'
)))
{
if
(
isset
(
$build
[
$key
])
&&
!
in_array
(
$block
->
get
(
'plugin'
),
array
(
'system_help_block'
,
'system_main_block'
)))
{
$build
[
$key
][
'#contextual_links'
][
'block'
]
=
array
(
'admin/structure/block/manage'
,
array
(
$key
));
}
}
...
...
core/modules/block/lib/Drupal/block/Tests/BlockTest.php
View file @
1fb4c7e1
...
...
@@ -59,6 +59,7 @@ function testBlockVisibility() {
// Confirm that an empty block is not displayed.
$this
->
assertNoText
(
'Powered by Drupal'
,
'Empty block not displayed.'
);
$this
->
assertNoRaw
(
'sidebar-first'
,
'Empty sidebar-first region is not displayed.'
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment