Permalink
Browse files

MDL-28292 - Blocks - Patch supplied by Chris Follin to fix blocks wit…

…h empty titles that disappear when docked
  • Loading branch information...
1 parent 919e659 commit d153f01a532f699b9079252763b178d46a9db374 @jsnfwlr jsnfwlr committed Nov 3, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 blocks/html/block_html.php
View
@@ -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 d153f01

Please sign in to comment.