| 1 |
<?php
|
| 2 |
// $Id: nodeasblock.install,v 1.3 2008/06/18 07:26:08 herc Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Install file for nodeasblock module.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Implementation of hook_install().
|
| 11 |
*/
|
| 12 |
function nodeasblock_schema() {
|
| 13 |
$schema['nodeasblock'] = array(
|
| 14 |
'description' => t('Stores {node.nid} of nodes to be displayed as blocks.'),
|
| 15 |
'fields' => array(
|
| 16 |
'nid' => array(
|
| 17 |
'type' => 'int',
|
| 18 |
'not null' => TRUE,
|
| 19 |
'description' => t('Primary Key: Node ID'),
|
| 20 |
),
|
| 21 |
),
|
| 22 |
'primary key' => array('nid'),
|
| 23 |
);
|
| 24 |
return $schema;
|
| 25 |
}
|
| 26 |
|
| 27 |
/**
|
| 28 |
* Implementation of hook_install().
|
| 29 |
*/
|
| 30 |
function nodeasblock_install() {
|
| 31 |
drupal_install_schema('nodeasblock');
|
| 32 |
}
|
| 33 |
|
| 34 |
/**
|
| 35 |
* Implementation of hook_uninstall().
|
| 36 |
*
|
| 37 |
* Remove the database schema, module variables and rehash the 'blocks' table.
|
| 38 |
*/
|
| 39 |
function nodeasblock_uninstall() {
|
| 40 |
drupal_uninstall_schema('nodeasblock');
|
| 41 |
}
|