MDL-40226 Files: Added the correct MIME Type for JNLP files.

JNLP stands for Java Network Launch Protocol, used to launch
Java Web Start applications. More details in:
http://docs.oracle.com/javase/tutorial/deployment/webstart/deploying.html
This commit is contained in:
Matteo Scaramuccia 2013-10-06 16:17:31 +02:00
parent 56cc9b387e
commit fd43a49b72
3 changed files with 17 additions and 1 deletions

View File

@ -2576,5 +2576,20 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2013092700.01);
}
if ($oldversion < 2013100400.01) {
// Fixing possible wrong MIME type for Java Network Launch Protocol (JNLP) files.
$select = $DB->sql_like('filename', '?', false);
$DB->set_field_select(
'files',
'mimetype',
'application/x-java-jnlp-file',
$select,
array('%.jnlp')
);
// Main savepoint reached.
upgrade_main_savepoint(true, 2013100400.01);
}
return true;
}

View File

@ -1453,6 +1453,7 @@ function &get_mimetypes_array() {
'jcw' => array ('type'=>'text/xml', 'icon'=>'markup'),
'jmt' => array ('type'=>'text/xml', 'icon'=>'markup'),
'jmx' => array ('type'=>'text/xml', 'icon'=>'markup'),
'jnlp' => array ('type'=>'application/x-java-jnlp-file', 'icon'=>'markup'),
'jpe' => array ('type'=>'image/jpeg', 'icon'=>'jpeg', 'groups'=>array('image', 'web_image'), 'string'=>'image'),
'jpeg' => array ('type'=>'image/jpeg', 'icon'=>'jpeg', 'groups'=>array('image', 'web_image'), 'string'=>'image'),
'jpg' => array ('type'=>'image/jpeg', 'icon'=>'jpeg', 'groups'=>array('image', 'web_image'), 'string'=>'image'),

View File

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2013100400.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2013100400.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.