function media_browser_plus_update_7300 in Media Browser Plus 7.3
Update from 2.x to 3.x branch.
File
- ./
media_browser_plus.install, line 129 - Install file for media_browser_plus.
Code
function media_browser_plus_update_7300() {
// Set weight.
db_query("UPDATE {system} SET weight = 11 WHERE name = 'media_browser_plus'");
// Fetch the media root term and store it in the related variable.
$results = taxonomy_get_term_by_name('Media Root', 'media_folders');
if (!empty($results)) {
$root_folder = reset($results);
}
variable_set('media_browser_plus_root_folder_tid', $root_folder->tid);
// Remove legacy variables.
variable_del('media_media_per_page');
variable_del('media_grid_window_height');
variable_del('media_page_items_per_page');
// Make sure the dependency modules are enabled.
module_enable(array(
'views_tree',
'views_bulk_operations',
));
}