From 4664b66c73969b55639a83c98535d77753cc0a36 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 19 Nov 2008 20:24:44 +0000 Subject: [PATCH] MDL-16596 areafiles improvements --- lib/form/areafiles.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); -- 2.39.5