Merge branch 'MDL-43570-M25' of https://github.com/KristerV/moodle into MOODLE_25_STABLE
This commit is contained in:
@@ -2345,5 +2345,21 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2013051404.04);
|
||||
}
|
||||
|
||||
if ($oldversion < 2013051405.10) {
|
||||
// Fixing possible wrong MIME type for DigiDoc files.
|
||||
$extensions = array('%.bdoc', '%.cdoc', '%.ddoc');
|
||||
$select = $DB->sql_like('filename', '?', false);
|
||||
foreach ($extensions as $extension) {
|
||||
$DB->set_field_select(
|
||||
'files',
|
||||
'mimetype',
|
||||
'application/x-digidoc',
|
||||
$select,
|
||||
array($extension)
|
||||
);
|
||||
}
|
||||
upgrade_main_savepoint(true, 2013051405.10);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1454,6 +1454,9 @@ function &get_mimetypes_array() {
|
||||
'dmg' => array ('type'=>'application/octet-stream', 'icon'=>'unknown'),
|
||||
|
||||
'doc' => array ('type'=>'application/msword', 'icon'=>'document', 'groups'=>array('document')),
|
||||
'bdoc' => array ('type'=>'application/x-digidoc', 'icon'=>'document', 'groups'=>array('archive')),
|
||||
'cdoc' => array ('type'=>'application/x-digidoc', 'icon'=>'document', 'groups'=>array('archive')),
|
||||
'ddoc' => array ('type'=>'application/x-digidoc', 'icon'=>'document', 'groups'=>array('archive')),
|
||||
'docx' => array ('type'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'icon'=>'document', 'groups'=>array('document')),
|
||||
'docm' => array ('type'=>'application/vnd.ms-word.document.macroEnabled.12', 'icon'=>'document'),
|
||||
'dotx' => array ('type'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'icon'=>'document'),
|
||||
|
||||
Reference in New Issue
Block a user