function media_gallery_extra_update_weight in Media Gallery Extra 7
Helper function to set module weight to a value higher than media_gallery.
2 calls to media_gallery_extra_update_weight()
- media_gallery_directory_install in modules/
directory/ media_gallery_directory.install - Implements hook_install().
- media_gallery_extra_install in ./
media_gallery_extra.install - Implements hook_install().
File
- ./
media_gallery_extra.install, line 30 - Install, update and uninstall functions for the media gallery extra module.
Code
function media_gallery_extra_update_weight($module = 'media_gallery_extra') {
$weight = db_query("SELECT weight FROM {system} WHERE type = 'module' AND name = 'media_gallery'")
->fetchField();
db_update('system')
->fields(array(
'weight' => $weight + 1,
))
->condition('type', 'module')
->condition('name', $module)
->execute();
}