]> git.mjollnir.org Git - moodle.git/commitdiff
blocks: MDL-19010 show empty blocks if they have controls.
authortjhunt <tjhunt>
Tue, 14 Jul 2009 07:06:06 +0000 (07:06 +0000)
committertjhunt <tjhunt>
Tue, 14 Jul 2009 07:06:06 +0000 (07:06 +0000)
blocks/moodleblock.class.php

index 8a4626f4585b86ccdbfb32e175fc88afbf1bef64..f6e03a3b7c038ffb5e0aba5240e780879f699c8c 100644 (file)
@@ -360,14 +360,14 @@ class block_base {
             $bc->footer = $this->content->footer;
         }
 
-        if ($this->is_empty() && !$bc->controls) {
-            return null;
-        }
-
         if ($this->page->user_is_editing()) {
             $bc->controls = $this->get_edit_controls($output);
         }
 
+        if ($this->is_empty() && !$bc->controls) {
+            return null;
+        }
+
         if (empty($CFG->allowuserblockhiding)) {
             $bc->collapsible = block_contents::NOT_HIDEABLE;
         } else if (get_user_preferences('block' . $bc->blockinstanceid . 'hidden', false)) {