diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 99e2b8139f4..282ba44572f 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2674,5 +2674,20 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2013100900.00); } + if ($oldversion < 2013100901.00) { + // 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, 2013100901.00); + } + return true; } diff --git a/lib/filelib.php b/lib/filelib.php index 3674d5c3d51..364e43f0289 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -1451,6 +1451,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'), diff --git a/version.php b/version.php index c5bcfafcc2a..2b875e96e6e 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2013100900.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2013100901.00; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes.