Skip to content

Commit

Permalink
MDL-28292 - Blocks - Patch supplied by Chris Follin to fix blocks wit…
Browse files Browse the repository at this point in the history
…h empty titles that disappear when docked
  • Loading branch information
jsnfwlr committed Nov 3, 2011
1 parent f08f22c commit 930bbe9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions blocks/html/block_html.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,14 @@ function content_is_trusted() {

return true;
}

/**
* The block should only be dockable when the title of the block is not empty
* and when parent allows docking.
*
* @return bool
*/
public function instance_can_be_docked() {
return (!empty($this->config->title) && parent::instance_can_be_docked());
}
}

0 comments on commit 930bbe9

Please sign in to comment.