Merge branch 'm25_MDL-38468_Fix_MHTML_files_delivery' of https://github.com/scara/moodle

Conflicts:
	lib/db/upgrade.php
	version.php
This commit is contained in:
Damyon Wiese
2013-03-26 15:13:35 +08:00
3 changed files with 19 additions and 1 deletions
+16
View File
@@ -1763,5 +1763,21 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2013032200.01);
}
if ($oldversion < 2013032600.03) {
// Fixing possible wrong MIME type for MIME HTML (MHTML) files.
$extensions = array('%.mht', '%.mhtml');
$select = $DB->sql_like('filename', '?', false);
foreach ($extensions as $extension) {
$DB->set_field_select(
'files',
'mimetype',
'message/rfc822',
$select,
array($extension)
);
}
upgrade_main_savepoint(true, 2013032600.03);
}
return true;
}
+2
View File
@@ -1513,6 +1513,8 @@ function &get_mimetypes_array() {
'mp4' => array ('type'=>'video/mp4', 'icon'=>'mpeg', 'groups'=>array('video','web_video'), 'string'=>'video'),
'm4v' => array ('type'=>'video/mp4', 'icon'=>'mpeg', 'groups'=>array('video','web_video'), 'string'=>'video'),
'm4a' => array ('type'=>'audio/mp4', 'icon'=>'mp3', 'groups'=>array('audio'), 'string'=>'audio'),
'mht' => array ('type'=>'message/rfc822', 'icon'=>'archive'),
'mhtml'=> array ('type'=>'message/rfc822', 'icon'=>'archive'),
'mpeg' => array ('type'=>'video/mpeg', 'icon'=>'mpeg', 'groups'=>array('video','web_video'), 'string'=>'video'),
'mpe' => array ('type'=>'video/mpeg', 'icon'=>'mpeg', 'groups'=>array('video','web_video'), 'string'=>'video'),
'mpg' => array ('type'=>'video/mpeg', 'icon'=>'mpeg', 'groups'=>array('video','web_video'), 'string'=>'video'),
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2013032600.02; // YYYYMMDD = weekly release date of this DEV branch
$version = 2013032600.03; // YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes