MDL-30008 Filepicker: correctly handles allowed file types
This commit is contained in:
@@ -69,6 +69,7 @@ M.form_filemanager.init = function(Y, options) {
|
||||
this.filepicker_options.maxbytes = this.maxbytes;
|
||||
this.filepicker_options.env = 'filemanager';
|
||||
this.filepicker_options.itemid = options.itemid;
|
||||
this.filepicker_options.accepted_types = options.accepted_types;
|
||||
|
||||
if (options.filecount) {
|
||||
this.filecount = options.filecount;
|
||||
|
||||
@@ -124,7 +124,7 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element {
|
||||
$subdirs = $this->_options['subdirs'];
|
||||
$maxbytes = $this->_options['maxbytes'];
|
||||
$draftitemid = $this->getValue();
|
||||
$accepted_types = $this->_options['accepted_types'];
|
||||
$accepted_types = (array) $this->_options['accepted_types'];
|
||||
|
||||
if (empty($draftitemid)) {
|
||||
// no existing area info provided - let's use fresh new draft area
|
||||
|
||||
Reference in New Issue
Block a user