mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
editor formslib element: symbolic constant EDITOR_UNLIMITED_FILES instead of hard-coded -1.
This commit is contained in:
parent
5977e635a1
commit
832e13f144
@ -28,6 +28,8 @@ require_once 'HTML/QuickForm/Renderer/Tableless.php';
|
||||
require_once $CFG->libdir.'/filelib.php';
|
||||
require_once $CFG->libdir.'/uploadlib.php'; // TODO: remove
|
||||
|
||||
define('EDITOR_UNLIMITED_FILES', -1);
|
||||
|
||||
/**
|
||||
* Callback called when PEAR throws an error
|
||||
*
|
||||
|
@ -23,7 +23,8 @@ 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'=>-1, 'filearea'=>'forum_post'));
|
||||
$mform->addElement('editor', 'message', get_string('message', 'forum'),
|
||||
array('maxfiles' => EDITOR_UNLIMITED_FILES, 'filearea' => 'forum_post'));
|
||||
$mform->setType('message', PARAM_RAW);
|
||||
$mform->addRule('message', get_string('required'), 'required', null, 'client');
|
||||
$mform->setHelpButton('message', array('reading', 'writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
|
||||
|
Loading…
x
Reference in New Issue
Block a user