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);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue