function media_update_7213 in D7 Media 7.3
Same name and namespace in other branches
- 7.4 media.install \media_update_7213()
- 7.2 media.install \media_update_7213()
Remove the obsolete file_extensions variable.
File
- ./
media.install, line 1050 - Install, update and uninstall functions for the Media module.
Code
function media_update_7213() {
$media_file_extensions = explode(' ', variable_get('media__file_extensions'));
$file_entity_file_extensions = explode(' ', variable_get('file_entity_default_allowed_extensions', 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp mp3 mov mp4 m4a m4v mpeg avi ogg oga ogv weba webp webm'));
// Preserve any custom file extensions.
if (array_diff($media_file_extensions, $file_entity_file_extensions)) {
$combined_file_extensions = array_unique(array_merge($file_entity_file_extensions, $media_file_extensions));
variable_set('file_entity_default_allowed_extensions', implode(' ', $combined_file_extensions));
}
variable_del('media__file_extensions');
}