Merge branch 'MDL-45418_27' of git://github.com/stronk7/moodle into MOODLE_27_STABLE
@@ -3660,5 +3660,12 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2014051200.02);
|
||||
}
|
||||
|
||||
if ($oldversion < 2014051200.06) {
|
||||
// Fixing possible wrong MIME type for Publisher files.
|
||||
$filetypes = array('%.pub'=>'application/x-mspublisher');
|
||||
upgrade_mimetypes($filetypes);
|
||||
upgrade_main_savepoint(true, 2014051200.06);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -456,3 +456,23 @@ function upgrade_availability_item($groupmembersonly, $groupingid,
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the mime-types for files that exist in the database, based on their
|
||||
* file extension.
|
||||
*
|
||||
* @param array $filetypes Array with file extension as the key, and mimetype as the value
|
||||
*/
|
||||
function upgrade_mimetypes($filetypes) {
|
||||
global $DB;
|
||||
$select = $DB->sql_like('filename', '?', false);
|
||||
foreach ($filetypes as $extension=>$mimetype) {
|
||||
$DB->set_field_select(
|
||||
'files',
|
||||
'mimetype',
|
||||
$mimetype,
|
||||
$select,
|
||||
array($extension)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1507,7 +1507,6 @@ function &get_mimetypes_array() {
|
||||
'pic' => array ('type'=>'image/pict', 'icon'=>'image', 'groups'=>array('image'), 'string'=>'image'),
|
||||
'pict' => array ('type'=>'image/pict', 'icon'=>'image', 'groups'=>array('image'), 'string'=>'image'),
|
||||
'png' => array ('type'=>'image/png', 'icon'=>'png', 'groups'=>array('image', 'web_image'), 'string'=>'image'),
|
||||
|
||||
'pps' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'powerpoint', 'groups'=>array('presentation')),
|
||||
'ppt' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'powerpoint', 'groups'=>array('presentation')),
|
||||
'pptx' => array ('type'=>'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'icon'=>'powerpoint'),
|
||||
@@ -1517,8 +1516,9 @@ function &get_mimetypes_array() {
|
||||
'ppam' => array ('type'=>'application/vnd.ms-powerpoint.addin.macroEnabled.12', 'icon'=>'powerpoint'),
|
||||
'ppsx' => array ('type'=>'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'icon'=>'powerpoint'),
|
||||
'ppsm' => array ('type'=>'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'icon'=>'powerpoint'),
|
||||
|
||||
'ps' => array ('type'=>'application/postscript', 'icon'=>'pdf'),
|
||||
'pub' => array ('type'=>'application/x-mspublisher', 'icon'=>'publisher', 'groups'=>array('presentation')),
|
||||
|
||||
'qt' => array ('type'=>'video/quicktime', 'icon'=>'quicktime', 'groups'=>array('video','web_video'), 'string'=>'video'),
|
||||
'ra' => array ('type'=>'audio/x-realaudio-plugin', 'icon'=>'audio', 'groups'=>array('audio','web_audio'), 'string'=>'audio'),
|
||||
'ram' => array ('type'=>'audio/x-pn-realaudio-plugin', 'icon'=>'audio', 'groups'=>array('audio'), 'string'=>'audio'),
|
||||
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
@@ -29,7 +29,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2014051200.05; // 20140512 = branching date YYYYMMDD - do not modify!
|
||||
$version = 2014051200.06; // 20140512 = branching date YYYYMMDD - do not modify!
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
|
||||
|
||||