MDL-16596 areafiles improvements

This commit is contained in:
skodak 2008-11-19 20:24:44 +00:00
parent 57a7e643c0
commit 4664b66c73

View file

@ -4,7 +4,7 @@ require_once('HTML/QuickForm/element.php');
class MoodleQuickForm_areafiles extends HTML_QuickForm_element {
protected $_helpbutton = '';
protected $_options = array('subdirs'=>0, 'maxbytes'=>0);
protected $_options = array('subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>0);
function MoodleQuickForm_areafiles($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
global $CFG;
@ -54,6 +54,14 @@ class MoodleQuickForm_areafiles extends HTML_QuickForm_element {
$this->_options['subdirs'] = $allow;
}
function getMaxfiles() {
return $this->_options['maxfiles'];
}
function setMaxfiles($num) {
$this->_options['maxfiles'] = $num;
}
function setHelpButton($_helpbuttonargs, $function='_helpbutton') {
if (!is_array($_helpbuttonargs)) {
$_helpbuttonargs = array($_helpbuttonargs);