Commit 2442c6bd authored by Nigel McNie's avatar Nigel McNie
Browse files

Allow files with extensions that are not lower case to be embedded in views. Fixes #2020.

parent 7b5df11b
...@@ -66,7 +66,7 @@ class PluginBlocktypeInternalmedia extends PluginBlocktype { ...@@ -66,7 +66,7 @@ class PluginBlocktypeInternalmedia extends PluginBlocktype {
$artefact = artefact_instance_from_id($configdata['artefactid']); $artefact = artefact_instance_from_id($configdata['artefactid']);
$width = (!empty($configdata['width'])) ? hsc($configdata['width']) : '300'; $width = (!empty($configdata['width'])) ? hsc($configdata['width']) : '300';
$height = (!empty($configdata['height'])) ? hsc($configdata['height']) : '300'; $height = (!empty($configdata['height'])) ? hsc($configdata['height']) : '300';
$extn = $artefact->get('oldextension'); $extn = strtolower($artefact->get('oldextension'));
if (!in_array($extn, self::get_allowed_extensions())) { if (!in_array($extn, self::get_allowed_extensions())) {
return get_string('typeremoved', 'blocktype.file/internalmedia'); return get_string('typeremoved', 'blocktype.file/internalmedia');
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment