Skip to content

Commit

Permalink
MDL-25636 block_html Fixed up missing format config if block restored…
Browse files Browse the repository at this point in the history
… from early 2.0 backup
  • Loading branch information
Sam Hemelryk authored and Aparup Banerjee committed Aug 23, 2011
1 parent 72bd83e commit bb37aab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion blocks/html/block_html.php
Expand Up @@ -62,7 +62,14 @@ function get_content() {
if (isset($this->config->text)) { if (isset($this->config->text)) {
// rewrite url // rewrite url
$this->config->text = file_rewrite_pluginfile_urls($this->config->text, 'pluginfile.php', $this->context->id, 'block_html', 'content', NULL); $this->config->text = file_rewrite_pluginfile_urls($this->config->text, 'pluginfile.php', $this->context->id, 'block_html', 'content', NULL);
$this->content->text = format_text($this->config->text, $this->config->format, $filteropt); // Default to FORMAT_HTML which is what will have been used before the
// editor was properly implemented for the block.
$format = FORMAT_HTML;
// Check to see if the format has been properly set on the config
if (isset($this->config->format)) {
$format = $this->config->format;
}
$this->content->text = format_text($this->config->text, $format, $filteropt);
} else { } else {
$this->content->text = ''; $this->content->text = '';
} }
Expand Down

0 comments on commit bb37aab

Please sign in to comment.