function media_soundcloud_update_7200 in Media: SoundCloud 7
Same name and namespace in other branches
- 7.2 media_soundcloud.install \media_soundcloud_update_7200()
Update Media Soundcloud files to the new audio file_entity type.
File
- ./
media_soundcloud.install, line 31 - Install, update and uninstall functions for the Media: SoundCloud module.
Code
function media_soundcloud_update_7200() {
// Removed previously added update because we don't want to update all undefined to be audio.
// They could be documents etc too.
// But leaving stub as some users maybe already have run this update...
//// update mimetype
//module_load_include('inc', 'file_entity', 'file_api');
//$audio_type = file_type_load('audio');
//$audio_type->mimetypes[] = 'audio/soundcloud';
//file_type_save($audio_type);
//
//// Update existing files
//db_query("UPDATE {file_managed} SET type = 'audio' WHERE type = 'undefined' AND filemime = 'audio/soundcloud'");
}