]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19611 fixing regression - video icon disappeared
authorskodak <skodak>
Wed, 24 Jun 2009 22:54:49 +0000 (22:54 +0000)
committerskodak <skodak>
Wed, 24 Jun 2009 22:54:49 +0000 (22:54 +0000)
lib/form/editor.php
mod/forum/post_form.php

index 053f3cd1c72cf368eb9d8c78fa640905c62af591..7de814cc394021e8dbaec0ef7be27ad63a679fd6 100644 (file)
@@ -10,7 +10,7 @@ require_once('HTML/QuickForm/element.php');
 class MoodleQuickForm_editor extends HTML_QuickForm_element {
     protected $_helpbutton = '';
     protected $_options    = array('subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>0, 'changeformat'=>0,
-                                   'context'=>null, 'noclean'=>0, 'trusttext'=>0);
+                                   'context'=>null, 'noclean'=>0, 'trusted'=>0);
     protected $_values     = array('text'=>null, 'format'=>null, 'itemid'=>null);
 
     function MoodleQuickForm_editor($elementName=null, $elementLabel=null, $attributes=null, $options=null) {
index 6ee86b2f90b5c81bdfbf50fd6c7caee6687cf97d..a3c43fddbfcc5439a9fff3815299154669a30e4f 100644 (file)
@@ -14,7 +14,9 @@ class mod_forum_post_form extends moodleform {
         $coursecontext = $this->_customdata['coursecontext'];
         $modcontext    = $this->_customdata['modcontext'];
         $forum         = $this->_customdata['forum'];
-        $post          = $this->_customdata['post']; // hack alert
+        $post          = $this->_customdata['post'];
+        // TODO: add max files and max size support
+        $editoroptions = array('maxfiles' => EDITOR_UNLIMITED_FILES, 'trusted'=>trusttext_trusted($modcontext), 'context'=>$modcontext);
 
         $mform->addElement('header', 'general', '');//fill in the data depending on page params
                                                     //later using set_data
@@ -23,7 +25,7 @@ class mod_forum_post_form extends moodleform {
         $mform->addRule('subject', get_string('required'), 'required', null, 'client');
         $mform->addRule('subject', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
 
-        $mform->addElement('editor', 'message', get_string('message', 'forum'), null, array('maxfiles' => EDITOR_UNLIMITED_FILES));
+        $mform->addElement('editor', 'message', get_string('message', 'forum'), null, $editoroptions);
         $mform->setType('message', PARAM_RAW);
         $mform->addRule('message', get_string('required'), 'required', null, 'client');
         $mform->setHelpButton('message', array('reading', 'writing', 'questions', 'richtext2'), false, 'editorhelpbutton');