MDL-30008 Filepicker: correctly handles allowed file types

This commit is contained in:
Frederic Massart
2012-06-14 10:03:28 +08:00
parent 4776262f05
commit 795fd70584
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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;
+1 -1
View File
@@ -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