MDL-29987 File resource: fix problem with PDF display on mobile devices

Setting the default display option for PDF files from DISPLAY_EMBED to DISPLAY_OPEN
This commit is contained in:
Henning Bostelmann
2013-09-13 10:30:41 +01:00
parent 83f26f6407
commit df0671f0d2
+2 -2
View File
@@ -404,7 +404,7 @@ function resource_print_filenotfound($resource, $cm, $course) {
}
/**
* Decide the best diaply format.
* Decide the best display format.
* @param object $resource
* @return int display type constant
*/
@@ -424,7 +424,7 @@ function resource_get_final_display_type($resource) {
if (file_mimetype_in_typegroup($mimetype, 'archive')) {
return RESOURCELIB_DISPLAY_DOWNLOAD;
}
if (file_mimetype_in_typegroup($mimetype, array('web_image', '.pdf', '.htm', 'web_video', 'web_audio'))) {
if (file_mimetype_in_typegroup($mimetype, array('web_image', '.htm', 'web_video', 'web_audio'))) {
return RESOURCELIB_DISPLAY_EMBED;
}