mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-43570 filetypes: Added new filetypes - ddoc, bdoc, cdoc
This commit is contained in:
parent
83ddacfff7
commit
ecdb94d3e0
3 changed files with 20 additions and 1 deletions
|
@ -3624,5 +3624,21 @@ function xmldb_main_upgrade($oldversion) {
|
||||||
upgrade_main_savepoint(true, 2014041500.01);
|
upgrade_main_savepoint(true, 2014041500.01);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($oldversion < 2014043000.00) {
|
||||||
|
// 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, 2014043000.00);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1410,6 +1410,9 @@ function &get_mimetypes_array() {
|
||||||
'dmg' => array ('type'=>'application/octet-stream', 'icon'=>'unknown'),
|
'dmg' => array ('type'=>'application/octet-stream', 'icon'=>'unknown'),
|
||||||
|
|
||||||
'doc' => array ('type'=>'application/msword', 'icon'=>'document', 'groups'=>array('document')),
|
'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')),
|
'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'),
|
'docm' => array ('type'=>'application/vnd.ms-word.document.macroEnabled.12', 'icon'=>'document'),
|
||||||
'dotx' => array ('type'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'icon'=>'document'),
|
'dotx' => array ('type'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'icon'=>'document'),
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die();
|
defined('MOODLE_INTERNAL') || die();
|
||||||
|
|
||||||
$version = 2014042400.00; // YYYYMMDD = weekly release date of this DEV branch.
|
$version = 2014043000.00; // YYYYMMDD = weekly release date of this DEV branch.
|
||||||
// RR = release increments - 00 in DEV branches.
|
// RR = release increments - 00 in DEV branches.
|
||||||
// .XX = incremental changes.
|
// .XX = incremental changes.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue