You are here

function subscriptions_install in Subscriptions 6

Same name and namespace in other branches
  1. 5.2 subscriptions.install \subscriptions_install()
  2. 5 subscriptions.install \subscriptions_install()
  3. 7 subscriptions.install \subscriptions_install()
  4. 2.0.x subscriptions.install \subscriptions_install()

Implementation of hook_install().

File

./subscriptions.install, line 88
Subscriptions module installation.

Code

function subscriptions_install() {
  $ret = drupal_install_schema('subscriptions');
  db_query("INSERT INTO {subscriptions_user} (uid, digest, send_interval, send_updates, send_comments, send_interval_visible, send_updates_visible, send_comments_visible, autosub_on_post, autosub_on_update, autosub_on_comment, send_self) VALUES(" . -DRUPAL_AUTHENTICATED_RID . ", 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1)");
  db_query("INSERT INTO {subscriptions_user} (uid) SELECT uid FROM {users} WHERE uid > 0");
  subscriptions_update_9();

  // remove 5.x-1.x-dev template variables if found
  include_once drupal_get_path('module', 'subscriptions') . '/subscriptions.install.inc';
  _subscriptions_install_information();
  return $ret;
}