From: moodler Date: Sat, 29 Jan 2005 03:55:29 +0000 (+0000) Subject: Some fixes to avoid notices etc X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=63689c58b12ac145765ebde192d82913ce8c434e;p=moodle.git Some fixes to avoid notices etc --- diff --git a/blocks/html/block_html.php b/blocks/html/block_html.php index 20b4c56805..f0af17a9f6 100755 --- a/blocks/html/block_html.php +++ b/blocks/html/block_html.php @@ -9,10 +9,8 @@ class block_html extends block_base { } function specialization() { - // Does not check if $this->config or $this->config->title - // are empty because if they are then the user wishes the title - // of the block to be hidden anyway - $this->title = $this->config->title; + // We allow empty titles + $this->title = isset($this->config->title) ? $this->config->title : ''; } function instance_allow_multiple() { @@ -27,7 +25,7 @@ class block_html extends block_base { } $this->content = new stdClass; - $this->content->text = $this->config->text; + $this->content->text = isset($this->config->text) ? $this->config->text : ''; $this->content->footer = ''; return $this->content; diff --git a/blocks/html/config_instance.html b/blocks/html/config_instance.html index 965b5a2fc9..876ad9728c 100755 --- a/blocks/html/config_instance.html +++ b/blocks/html/config_instance.html @@ -1,3 +1,4 @@ + @@ -5,11 +6,14 @@ - +

:

:

config->text); ?>config->text)?$this->config->text:'') ?>
- \ No newline at end of file +