From 34d39b792cca366f235bdfaf3e870053c944baa3 Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 11 May 2009 18:55:03 +0000 Subject: [PATCH] MDL-19002 standardized constructor parameter order --- course/editsection_form.php | 2 +- course/moodleform_mod.php | 2 +- lib/form/editor.php | 2 +- mod/forum/post_form.php | 2 +- mod/glossary/comment_form.php | 2 +- mod/glossary/edit_form.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/course/editsection_form.php b/course/editsection_form.php index 99ce5d0325..ef825af0ad 100644 --- a/course/editsection_form.php +++ b/course/editsection_form.php @@ -10,7 +10,7 @@ class editsection_form extends moodleform { $mform = $this->_form; $course = $this->_customdata; - $mform->addElement('editor', 'summary', get_string('summary'), array('changeformat'=>false, 'maxfiles'=>-1)); + $mform->addElement('editor', 'summary', get_string('summary'), null, array('changeformat'=>false, 'maxfiles'=>-1)); $mform->addElement('hidden', 'id'); $mform->setType('id', PARAM_INT); diff --git a/course/moodleform_mod.php b/course/moodleform_mod.php index bb763864d6..427a1c611a 100644 --- a/course/moodleform_mod.php +++ b/course/moodleform_mod.php @@ -581,7 +581,7 @@ class moodleform_mod extends moodleform { $mform = $this->_form; $label = is_null($customlabel) ? get_string('moduleintro') : $customlabel; - $mform->addElement('editor', 'introeditor', $label, array('maxfiles'=>EDITOR_UNLIMITED_FILES)); + $mform->addElement('editor', 'introeditor', $label, null, array('maxfiles'=>EDITOR_UNLIMITED_FILES)); $mform->setType('introeditor', PARAM_RAW); // no XSS prevention here, users must be trusted if ($required) { $mform->addRule('introeditor', get_string('required'), 'required', null, 'client'); diff --git a/lib/form/editor.php b/lib/form/editor.php index b0eabac6aa..287d52934f 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -14,7 +14,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element { protected $_options = array('subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>0, 'changeformat'=>0); protected $_values = array('text'=>null, 'format'=>null, 'itemid'=>null); - function MoodleQuickForm_editor($elementName=null, $elementLabel=null, $options=null, $attributes=null) { + function MoodleQuickForm_editor($elementName=null, $elementLabel=null, $attributes=null, $options=null) { global $CFG; $options = (array)$options; diff --git a/mod/forum/post_form.php b/mod/forum/post_form.php index 244066b9a3..6ee86b2f90 100644 --- a/mod/forum/post_form.php +++ b/mod/forum/post_form.php @@ -23,7 +23,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'), array('maxfiles' => EDITOR_UNLIMITED_FILES)); + $mform->addElement('editor', 'message', get_string('message', 'forum'), null, array('maxfiles' => EDITOR_UNLIMITED_FILES)); $mform->setType('message', PARAM_RAW); $mform->addRule('message', get_string('required'), 'required', null, 'client'); $mform->setHelpButton('message', array('reading', 'writing', 'questions', 'richtext2'), false, 'editorhelpbutton'); diff --git a/mod/glossary/comment_form.php b/mod/glossary/comment_form.php index d576f0efd1..30c52f2e9e 100644 --- a/mod/glossary/comment_form.php +++ b/mod/glossary/comment_form.php @@ -10,7 +10,7 @@ class mod_glossary_comment_form extends moodleform { $commentoptions = $this->_customdata['commentoptions']; // visible elements - $mform->addElement('editor', 'entrycomment_editor', get_string('comment', 'glossary'), $commentoptions); + $mform->addElement('editor', 'entrycomment_editor', get_string('comment', 'glossary'), null, $commentoptions); $mform->addRule('entrycomment_editor', get_string('required'), 'required', null, 'client'); $mform->setType('entrycomment_editor', PARAM_RAW); // processed by trust text or cleaned before the display diff --git a/mod/glossary/edit_form.php b/mod/glossary/edit_form.php index de29588385..d0767f7d28 100644 --- a/mod/glossary/edit_form.php +++ b/mod/glossary/edit_form.php @@ -21,7 +21,7 @@ class mod_glossary_entry_form extends moodleform { $mform->setType('concept', PARAM_TEXT); $mform->addRule('concept', null, 'required', null, 'client'); - $mform->addElement('editor', 'definition_editor', get_string('definition', 'glossary'), $definitionoptions); + $mform->addElement('editor', 'definition_editor', get_string('definition', 'glossary'), null, $definitionoptions); $mform->setType('definition_editor', PARAM_RAW); $mform->addRule('definition_editor', get_string('required'), 'required', null, 'client'); -- 2.39.5