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

Contents of /contributions/modules/restricted_content/restricted_content.install

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


Revision 1.2 - (show annotations) (download) (as text)
Sat Jan 3 04:25:12 2009 UTC (10 months, 3 weeks ago) by davereid
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +6 -0 lines
File MIME type: text/x-php
- Added restricted_content_variables() and restricted_content_var().
- Added uninstall for variables.
- Added administration settings form with customizable messages.
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 }

  ViewVC Help
Powered by ViewVC 1.1.2