Skip to content

Commit

Permalink
MDL-19844 Fixed one little glitch on new blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed May 3, 2010
1 parent 63eee7b commit 00ab45e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion blocks/html/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ protected function specific_definition($mform) {
function set_data($defaults) {
$block = $this->block;
$draftid_editor = file_get_submitted_draft_itemid('config_text');
$block->config->text['text'] = file_prepare_draft_area($draftid_editor, $block->context->id, 'block_html', $block->instance->id, array('subdirs'=>true), $block->config->text['text']);
if (empty($block->config->text['text'])) {
$currenttext = '';
} else {
$currenttext = $block->config->text['text'];
}
$block->config->text['text'] = file_prepare_draft_area($draftid_editor, $block->context->id, 'block_html', $block->instance->id, array('subdirs'=>true), $currenttext);
$block->config->text['itemid'] = $draftid_editor;
parent::set_data($defaults);
}
Expand Down

0 comments on commit 00ab45e

Please sign in to comment.