From baf9c832dea61b1fa79b9553f09c6dc008280acd Mon Sep 17 00:00:00 2001 From: Jason Fowler Date: Thu, 3 Nov 2011 16:18:39 +0800 Subject: [PATCH] MDL-28292 - Blocks - Patch supplied by Chris Follin to fix blocks with empty titles that disappear when docked --- blocks/html/block_html.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/blocks/html/block_html.php b/blocks/html/block_html.php index bead128d884..c8962810f38 100644 --- a/blocks/html/block_html.php +++ b/blocks/html/block_html.php @@ -121,4 +121,14 @@ class block_html extends block_base { 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()); + } }