Skip to content
Browse files

MDL-30008 Filepicker: correctly handles allowed file types

  • Loading branch information...
1 parent 63e5dde commit f17cc9cfe8217c78b97b6d446120b7bc58982fc2 @FMCorz FMCorz committed Jun 14, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 lib/form/filemanager.js
  2. +1 −1 lib/form/filemanager.php
View
1 lib/form/filemanager.js
@@ -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;
View
2 lib/form/filemanager.php
@@ -124,7 +124,7 @@ function toHtml() {
$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

0 comments on commit f17cc9c

Please sign in to comment.
Something went wrong with that request. Please try again.