Merge branch 'MDL-35622-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE
Conflicts: lib/db/upgrade.php version.php
This commit is contained in:
@@ -1533,5 +1533,23 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2012120301.09);
|
||||
}
|
||||
|
||||
if ($oldversion < 2012120301.10) {
|
||||
// Fixing possible wrong MIME types for SMART Notebook files.
|
||||
$extensions = array('%.gallery', '%.galleryitem', '%.gallerycollection', '%.nbk', '%.notebook', '%.xbk');
|
||||
$select = $DB->sql_like('filename', '?', false);
|
||||
foreach ($extensions as $extension) {
|
||||
$DB->set_field_select(
|
||||
'files',
|
||||
'mimetype',
|
||||
'application/x-smarttech-notebook',
|
||||
$select,
|
||||
array($extension)
|
||||
);
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2012120301.10);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1456,6 +1456,10 @@ function &get_mimetypes_array() {
|
||||
'fdf' => array ('type'=>'application/pdf', 'icon'=>'pdf'),
|
||||
'flv' => array ('type'=>'video/x-flv', 'icon'=>'flash', 'groups'=>array('video','web_video'), 'string'=>'video'),
|
||||
'f4v' => array ('type'=>'video/mp4', 'icon'=>'flash', 'groups'=>array('video','web_video'), 'string'=>'video'),
|
||||
|
||||
'gallery' => array ('type'=>'application/x-smarttech-notebook', 'icon'=>'archive'),
|
||||
'galleryitem,' => array ('type'=>'application/x-smarttech-notebook', 'icon'=>'archive'),
|
||||
'gallerycollection' => array ('type'=>'application/x-smarttech-notebook', 'icon'=>'archive'),
|
||||
'gif' => array ('type'=>'image/gif', 'icon'=>'gif', 'groups'=>array('image', 'web_image'), 'string'=>'image'),
|
||||
'gtar' => array ('type'=>'application/x-gtar', 'icon'=>'archive', 'groups'=>array('archive'), 'string'=>'archive'),
|
||||
'tgz' => array ('type'=>'application/g-zip', 'icon'=>'archive', 'groups'=>array('archive'), 'string'=>'archive'),
|
||||
@@ -1499,6 +1503,9 @@ function &get_mimetypes_array() {
|
||||
'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'),
|
||||
|
||||
'nbk' => array ('type'=>'application/x-smarttech-notebook', 'icon'=>'archive'),
|
||||
'notebook' => array ('type'=>'application/x-smarttech-notebook', 'icon'=>'archive'),
|
||||
|
||||
'odt' => array ('type'=>'application/vnd.oasis.opendocument.text', 'icon'=>'writer', 'groups'=>array('document')),
|
||||
'ott' => array ('type'=>'application/vnd.oasis.opendocument.text-template', 'icon'=>'writer', 'groups'=>array('document')),
|
||||
'oth' => array ('type'=>'application/vnd.oasis.opendocument.text-web', 'icon'=>'oth', 'groups'=>array('document')),
|
||||
@@ -1578,6 +1585,8 @@ function &get_mimetypes_array() {
|
||||
'webm' => array ('type'=>'video/webm', 'icon'=>'video', 'groups'=>array('video'), 'string'=>'video'),
|
||||
'wmv' => array ('type'=>'video/x-ms-wmv', 'icon'=>'wmv', 'groups'=>array('video'), 'string'=>'video'),
|
||||
'asf' => array ('type'=>'video/x-ms-asf', 'icon'=>'wmv', 'groups'=>array('video'), 'string'=>'video'),
|
||||
|
||||
'xbk' => array ('type'=>'application/x-smarttech-notebook', 'icon'=>'archive'),
|
||||
'xdp' => array ('type'=>'application/pdf', 'icon'=>'pdf'),
|
||||
'xfd' => array ('type'=>'application/pdf', 'icon'=>'pdf'),
|
||||
'xfdf' => array ('type'=>'application/pdf', 'icon'=>'pdf'),
|
||||
@@ -1592,6 +1601,7 @@ function &get_mimetypes_array() {
|
||||
|
||||
'xml' => array ('type'=>'application/xml', 'icon'=>'markup'),
|
||||
'xsl' => array ('type'=>'text/xml', 'icon'=>'markup'),
|
||||
|
||||
'zip' => array ('type'=>'application/zip', 'icon'=>'archive', 'groups'=>array('archive'), 'string'=>'archive')
|
||||
);
|
||||
return $mimearray;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$version = 2012120301.09; // 20121203 = branching date YYYYMMDD - do not modify!
|
||||
$version = 2012120301.10; // 20121203 = branching date YYYYMMDD - do not modify!
|
||||
// RR = release increments - 00 in DEV branches
|
||||
// .XX = incremental changes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user