mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-19844 Fixed one little glitch on new blocks
This commit is contained in:
parent
63eee7b4b7
commit
00ab45e7a3
1 changed files with 6 additions and 1 deletions
|
@ -45,7 +45,12 @@ class block_html_edit_form extends block_edit_form {
|
||||||
function set_data($defaults) {
|
function set_data($defaults) {
|
||||||
$block = $this->block;
|
$block = $this->block;
|
||||||
$draftid_editor = file_get_submitted_draft_itemid('config_text');
|
$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;
|
$block->config->text['itemid'] = $draftid_editor;
|
||||||
parent::set_data($defaults);
|
parent::set_data($defaults);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue