From: skodak Date: Wed, 19 Nov 2008 20:24:44 +0000 (+0000) Subject: MDL-16596 areafiles improvements X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4664b66c73969b55639a83c98535d77753cc0a36;p=moodle.git MDL-16596 areafiles improvements --- diff --git a/lib/form/areafiles.php b/lib/form/areafiles.php index 846b8c699d..00dbb9c4a7 100644 --- a/lib/form/areafiles.php +++ b/lib/form/areafiles.php @@ -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);