| 1 |
<?php
|
| 2 |
// $Id: mailman_manager.install,v 1.11.2.1.2.6 2008/10/30 16:44:08 samuelet Exp $
|
| 3 |
/**
|
| 4 |
* Implementation of hook_install().
|
| 5 |
*/
|
| 6 |
function mailman_manager_install() {
|
| 7 |
// Create tables.
|
| 8 |
drupal_install_schema('mailman_manager');
|
| 9 |
}
|
| 10 |
|
| 11 |
/**
|
| 12 |
* Implementation of hook_uninstall().
|
| 13 |
*/
|
| 14 |
function mailman_manager_uninstall() {
|
| 15 |
// Remove tables.
|
| 16 |
drupal_uninstall_schema('mailman_manager');
|
| 17 |
}
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Implementation of hook_schema().
|
| 21 |
*/
|
| 22 |
function mailman_manager_schema() {
|
| 23 |
$schema['mailman_lists'] = array(
|
| 24 |
'description' => t('Stores specific information for mailiman lists.'),
|
| 25 |
'fields' => array(
|
| 26 |
'lid' => array(
|
| 27 |
'type' => 'serial',
|
| 28 |
'unsigned' => TRUE,
|
| 29 |
'not null' => TRUE,
|
| 30 |
'description' => t("The list lid.")
|
| 31 |
),
|
| 32 |
'name' => array(
|
| 33 |
'type' => 'varchar',
|
| 34 |
'length' => 48,
|
| 35 |
'not null' => TRUE,
|
| 36 |
'default' => '',
|
| 37 |
'description' => t('Mailing List name'),
|
| 38 |
),
|
| 39 |
'command' => array(
|
| 40 |
'type' => 'varchar',
|
| 41 |
'length' => 72,
|
| 42 |
'not null' => TRUE,
|
| 43 |
'default' => '',
|
| 44 |
'description' => t("Mailing List 'request' address"),
|
| 45 |
),
|
| 46 |
'admin' => array(
|
| 47 |
'type' => 'varchar',
|
| 48 |
'length' => 48,
|
| 49 |
'default' => '',
|
| 50 |
'description' => t("Mailing List 'admin' address"),
|
| 51 |
),
|
| 52 |
'web' => array(
|
| 53 |
'type' => 'varchar',
|
| 54 |
'length' => 255,
|
| 55 |
'default' => '',
|
| 56 |
'description' => t('Mailing list web address for users.'),
|
| 57 |
),
|
| 58 |
'webarch' => array(
|
| 59 |
'type' => 'varchar',
|
| 60 |
'length' => 255,
|
| 61 |
'default' => '',
|
| 62 |
'description' => t('Mailing list web archive address for users'),
|
| 63 |
),
|
| 64 |
),
|
| 65 |
'primary key' => array('lid'),
|
| 66 |
);
|
| 67 |
|
| 68 |
$schema['mailman_users'] = array(
|
| 69 |
'description' => t('Stores subscription information for users.'),
|
| 70 |
'fields' => array(
|
| 71 |
'uid' => array(
|
| 72 |
'type' => 'int',
|
| 73 |
'disp-width' => 10,
|
| 74 |
'not null' => TRUE,
|
| 75 |
'default' => 0,
|
| 76 |
'description' => t("The list id.")
|
| 77 |
),
|
| 78 |
'lid' => array(
|
| 79 |
'type' => 'int',
|
| 80 |
'disp-width' => 10,
|
| 81 |
'not null' => TRUE,
|
| 82 |
'default' => 0,
|
| 83 |
'description' => t("The list id.")
|
| 84 |
),
|
| 85 |
'lstatus' => array(
|
| 86 |
'type' => 'int',
|
| 87 |
'disp-width' => 10,
|
| 88 |
'not null' => TRUE,
|
| 89 |
'default' => 0,
|
| 90 |
'description' => t("The list lid.")
|
| 91 |
),
|
| 92 |
'lmail' => array(
|
| 93 |
'type' => 'varchar',
|
| 94 |
'length' => 36,
|
| 95 |
'not null' => TRUE,
|
| 96 |
'default' => '',
|
| 97 |
'description' => t('Current user subscribed email.'),
|
| 98 |
),
|
| 99 |
'lpass' => array(
|
| 100 |
'type' => 'varchar',
|
| 101 |
'length' => 36,
|
| 102 |
'not null' => TRUE,
|
| 103 |
'default' => '',
|
| 104 |
'description' => t('Current user list password.'),
|
| 105 |
),
|
| 106 |
),
|
| 107 |
'primary key' => array('uid', 'lid'),
|
| 108 |
);
|
| 109 |
|
| 110 |
return $schema;
|
| 111 |
}
|
| 112 |
|
| 113 |
function mailman_manager_update_6001() {
|
| 114 |
$ret = array();
|
| 115 |
// Rebuild menu cache
|
| 116 |
module_rebuild_cache();
|
| 117 |
return $ret;
|
| 118 |
}
|