MDL-43145 dock: fixed up region_completely_docked code to ignore empty regions

This commit is contained in:
Sam Hemelryk
2014-04-11 10:34:31 +08:00
committed by Andrew Nicols
parent ad5a8cd6a2
commit 34df4e4ba4
10 changed files with 25 additions and 15 deletions
+5 -1
View File
@@ -518,7 +518,11 @@ class block_manager {
$this->check_is_loaded();
$this->ensure_content_created($region, $output);
foreach($this->visibleblockcontent[$region] as $instance) {
if (!$this->region_has_content($region, $output)) {
// If the region has no content then nothing is docked at all of course.
return false;
}
foreach ($this->visibleblockcontent[$region] as $instance) {
if (!empty($instance->content) && !get_user_preferences('docked_block_instance_'.$instance->blockinstanceid, 0)) {
return false;
}