mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-33948 mod_forum correctly passes files options to file_save_draft_area_files()
This commit is contained in:
parent
3b6629c088
commit
61a339e598
3 changed files with 52 additions and 22 deletions
|
@ -510,7 +510,7 @@ require_once('post_form.php');
|
|||
$mform_post = new mod_forum_post_form('post.php', array('course'=>$course, 'cm'=>$cm, 'coursecontext'=>$coursecontext, 'modcontext'=>$modcontext, 'forum'=>$forum, 'post'=>$post));
|
||||
|
||||
$draftitemid = file_get_submitted_draft_itemid('attachments');
|
||||
file_prepare_draft_area($draftitemid, $modcontext->id, 'mod_forum', 'attachment', empty($post->id)?null:$post->id);
|
||||
file_prepare_draft_area($draftitemid, $modcontext->id, 'mod_forum', 'attachment', empty($post->id)?null:$post->id, mod_forum_post_form::attachment_options($forum));
|
||||
|
||||
//load data into form NOW!
|
||||
|
||||
|
@ -550,7 +550,7 @@ if (forum_is_subscribed($USER->id, $forum->id)) {
|
|||
}
|
||||
|
||||
$draftid_editor = file_get_submitted_draft_itemid('message');
|
||||
$currenttext = file_prepare_draft_area($draftid_editor, $modcontext->id, 'mod_forum', 'post', empty($post->id) ? null : $post->id, array('subdirs'=>true), $post->message);
|
||||
$currenttext = file_prepare_draft_area($draftid_editor, $modcontext->id, 'mod_forum', 'post', empty($post->id) ? null : $post->id, mod_forum_post_form::editor_options(), $post->message);
|
||||
$mform_post->set_data(array( 'attachments'=>$draftitemid,
|
||||
'general'=>$heading,
|
||||
'subject'=>$post->subject,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue