MDL-33144 display filetype icon and mimetype based on extension

- use finfo to determine mimetype of a file only when it is unknown from file extension
- display filetype icon and mimetype in filemanager based on file extension
- fixed a small issue with specifying extension instead of group in file_get_typegroup()
- allow only web-compartible image types when embedding into editor or using in database field
- created new groups web_video and web_audio to use in resource module
This commit is contained in:
Marina Glancy
2012-05-23 14:51:55 +08:00
parent 5a5cdaf92e
commit ae7f35b934
7 changed files with 55 additions and 56 deletions
+1 -1
View File
@@ -302,7 +302,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element {
$args = new stdClass();
// need these three to filter repositories list
$args->accepted_types = array('image');
$args->accepted_types = array('web_image');
$args->return_types = (FILE_INTERNAL | FILE_EXTERNAL | FILE_REFERENCE);
$args->context = $ctx;
$args->env = 'filepicker';