]> git.mjollnir.org Git - moodle.git/commitdiff
Grand Bugslayer Eloy at work again: Hiding the blocks if they have no content
authordefacer <defacer>
Tue, 20 Apr 2004 08:38:56 +0000 (08:38 +0000)
committerdefacer <defacer>
Tue, 20 Apr 2004 08:38:56 +0000 (08:38 +0000)
should mean "if they have no content AND no footer".

blocks/moodleblock.class.php

index b515b8d8fbc81779598c87efaca591613c5d3cfd..7a2e5b6fd1abafc26265bbaa198b3c048377d790 100644 (file)
@@ -60,7 +60,7 @@ class MoodleBlock {
 
         switch($this->content_type) {
             case BLOCK_TYPE_TEXT:
-                if(empty($this->content->text)) {
+                if(empty($this->content->text) && empty($this->content->footer)) {
                     break;
                 }
                 if ($this->edit_controls !== NULL || !$this->hide_header()) {
@@ -70,7 +70,7 @@ class MoodleBlock {
                 }
             break;
             case BLOCK_TYPE_LIST:
-                if(empty($this->content->items)) {
+                if(empty($this->content->items) && empty($this->content->footer)) {
                     break;
                 }
                 if ($this->edit_controls !== NULL || !$this->hide_header()) {