/[drupal]/drupal/modules/update/update.install
ViewVC logotype

Contents of /drupal/modules/update/update.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.11 - (show annotations) (download) (as text)
Tue Oct 13 02:14:05 2009 UTC (6 weeks, 1 day ago) by dries
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10
Changes since 1.10: +23 -1 lines
File MIME type: text/x-php
- Patch #597484 by dww: use the Queue API to fetch available update data.
1 <?php
2 // $Id: update.install,v 1.10 2009/09/10 06:38:20 dries Exp $
3
4 /**
5 * @file
6 * Install, update and uninstall functions for the update module.
7 */
8
9 /**
10 * Implement hook_install().
11 */
12 function update_install() {
13 $queue = DrupalQueue::get('update_fetch_tasks');
14 $queue->createQueue();
15 }
16
17 /**
18 * Implement hook_uninstall().
19 */
20 function update_uninstall() {
21 // Clear any variables that might be in use
22 $variables = array(
23 'update_check_frequency',
24 'update_fetch_url',
25 'update_last_check',
26 'update_notification_threshold',
27 'update_notify_emails',
28 'update_max_fetch_attempts',
29 'update_max_fetch_time',
30 );
31 foreach ($variables as $variable) {
32 variable_del($variable);
33 }
34 menu_rebuild();
35 $queue = DrupalQueue::get('update_fetch_tasks');
36 $queue->deleteQueue();
37 }
38
39 /**
40 * Implement hook_schema().
41 */
42 function update_schema() {
43 $schema['cache_update'] = drupal_get_schema_unprocessed('system', 'cache');
44 $schema['cache_update']['description'] = 'Cache table for the Update module to store information about available releases, fetched from central server.';
45 return $schema;
46 }
47
48 /**
49 * Create a queue to store tasks for requests to fetch available update data.
50 */
51 function update_update_7000() {
52 module_load_include('inc', 'system', 'system.queue');
53 $queue = DrupalQueue::get('update_fetch_tasks');
54 $queue->createQueue();
55 }
56

  ViewVC Help
Powered by ViewVC 1.1.2