When developing a custom module, what is the correct way to set a module's weight?
This is the correct way to do it in Drupal 7
/**
* Implements hook_enable()
*/
function YOUR_MODULE_enable() {
db_update('system')
->fields(array('weight' => 1))
->condition('type', 'module')
->condition('name', 'YOUR_MODULE')
->execute();
}