/[drupal]/contributions/modules/update_status/update_status.install
ViewVC logotype

Contents of /contributions/modules/update_status/update_status.install

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


Revision 1.3 - (show annotations) (download) (as text)
Wed Aug 15 07:05:05 2007 UTC (2 years, 3 months ago) by dww
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +10 -1 lines
File MIME type: text/x-php
Merging all changes from DRUPAL-5--2 up to DRUPAL-5--2-0 into HEAD.
1 <?php
2 // $Id: update_status.install,v 1.1.2.5 2007/08/14 07:24:49 dww Exp $
3
4 /**
5 * Implementation of hook_uninstall().
6 */
7 function update_status_uninstall() {
8 $variables = array(
9 'update_status_settings',
10 'update_status_notify_emails',
11 'update_status_check_frequency',
12 'update_status_notification_threshold',
13 'update_status_last',
14 'update_status_fetch_url',
15 );
16 foreach ($variables as $variable) {
17 variable_del($variable);
18 }
19 cache_clear_all();
20 }
21
22 /**
23 * Remove the old data in stale variables used by the 5.x-1.* releases.
24 */
25 function update_status_update_5200() {
26 $ret = array();
27 foreach (array('update_status_last', 'update_status') as $variable) {
28 variable_del($variable);
29 $ret[] = array('success' => TRUE, 'query' => "variable_del($variable)");
30 }
31 return $ret;
32 }
33
34 /**
35 * Database changes required for 5.x-2.0-rc2:
36 * - Rename and prune dead variables.
37 * - Clear menu cache.
38 */
39 function update_status_update_5201() {
40 $ret = array();
41 $error_threshold = variable_get('update_status_error_threshold', '');
42 if (!empty($error_threshold)) {
43 variable_set('update_status_notification_threshold', $error_threshold);
44 $ret[] = array('success' => TRUE, 'query' => "variable_set('update_status_notification_threshold', $error_threshold)");
45 }
46 foreach (array('update_status_error_threshold', 'update_status_usage_stats') as $variable) {
47 variable_del($variable);
48 $ret[] = array('success' => TRUE, 'query' => "variable_del($variable)");
49 }
50 // Reset the menu cache since admin/logs/updates/check is a new path.
51 cache_clear_all();
52 return $ret;
53 }
54
55 /**
56 * More thorough attempt at rebuilding the menu cache, since
57 * admin/logs/updates/check is a new path.
58 */
59 function update_status_update_5202() {
60 cache_clear_all();
61 menu_rebuild();
62 }

  ViewVC Help
Powered by ViewVC 1.1.2