summaryrefslogtreecommitdiff
path: root/modules/update/update.install
blob: b910fe79a19df3a4f50f24ed039e6b8552c81222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
// $Id$

/**
 * Implementation of hook_install().
 */
function update_install() {
  // Create cache table.
  drupal_install_schema('update');
}

/**
 * Implementation of hook_uninstall().
 */
function update_uninstall() {
  // Remove cache table.
  drupal_uninstall_schema('update');
  // Clear any variables that might be in use
  $variables = array(
    'update_check_frequency',
    'update_fetch_url',
    'update_last_check',
    'update_notification_threshold',
    'update_notify_emails',
  );
  foreach ($variables as $variable) {
    variable_del($variable);
  }
  menu_rebuild();
}

/**
 * Implementation of hook_schema().
 */
function update_schema() {
  $schema['cache_update'] = drupal_get_schema_unprocessed('system', 'cache');
  return $schema;
}