function subscriptions_content_install in Subscriptions 7
Same name and namespace in other branches
- 5.2 subscriptions_content.install \subscriptions_content_install()
- 6 subscriptions_content.install \subscriptions_content_install()
- 2.0.x subscriptions_content/subscriptions_content.install \subscriptions_content_install()
Implements hook_install().
File
- ./
subscriptions_content.install, line 11 - Subscriptions Content module installation.
Code
function subscriptions_content_install() {
// subscriptions_content.module needs to be heavier than taxonomy.module --
// otherwise term_node record has not been written when subscriptions_queue() is called!
// subscriptions_content_cron() will ensure this constraint at run-time.
$weight = 1 + db_select('system', 's')
->fields('s', array(
'weight',
))
->condition('s.name', 'taxonomy')
->condition('s.type', 'module')
->execute()
->fetchField();
db_update('system')
->fields(array(
'weight' => $weight,
))
->condition('type', 'module')
->condition('name', 'subscriptions_content')
->execute();
// Reset statics for the subscription types,so they are regenerated
// (see #2088375).
drupal_static_reset('subscriptions_types_types');
drupal_static_reset('subscriptions_types_list');
}