| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_install().
|
| 6 |
*/
|
| 7 |
function restricted_content_install() {
|
| 8 |
drupal_install_schema('restricted_content');
|
| 9 |
}
|
| 10 |
|
| 11 |
/**
|
| 12 |
* Implementation of hook_uninstall().
|
| 13 |
*/
|
| 14 |
function restricted_content_uninstall() {
|
| 15 |
drupal_uninstall_schema('restricted_content');
|
| 16 |
|
| 17 |
drupal_load('module', 'restricted_content');
|
| 18 |
$variables = restricted_content_variables();
|
| 19 |
foreach ($variables as $variable) {
|
| 20 |
variable_del($variable);
|
| 21 |
}
|
| 22 |
}
|
| 23 |
|
| 24 |
/**
|
| 25 |
* Implementation of hook_schema().
|
| 26 |
*/
|
| 27 |
function restricted_content_schema() {
|
| 28 |
$schema['restricted_content'] = array(
|
| 29 |
'fields' => array(
|
| 30 |
'nid' => array(
|
| 31 |
'type' => 'int',
|
| 32 |
'unsigned' => TRUE,
|
| 33 |
'not null' => TRUE,
|
| 34 |
'default' => 0,
|
| 35 |
),
|
| 36 |
'rids' => array(
|
| 37 |
'type' => 'text',
|
| 38 |
'size' => 'medium',
|
| 39 |
'not null' => FALSE,
|
| 40 |
),
|
| 41 |
),
|
| 42 |
'primary key' => array('nid'),
|
| 43 |
);
|
| 44 |
return $schema;
|
| 45 |
}
|