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

Contents of /contributions/modules/og_node_approval/og_node_approval.install

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


Revision 1.1 - (show annotations) (download) (as text)
Fri Nov 7 00:50:06 2008 UTC (12 months, 2 weeks ago) by mradcliffe
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1, DRUPAL-6--2
File MIME type: text/x-php
  * new module og_node_approval
1 <?php
2 // $Id$
3
4 function og_node_approval_install()
5 {
6 $field = array();
7
8 drupal_install_schema('og_node_approval');
9 drupal_set_message('Installed og_node_approval table into the database');
10
11 } // function og_node_approval_install
12
13 function og_node_approval_uninstall()
14 {
15 drupal_uninstall_schema('og_node_approval');
16 } // function og_node_approval_uninstall
17
18 function og_node_approval_schema()
19 {
20 $schema['og_node_approval'] = array(
21 'description' => t('Stores user node approval status per node'),
22 'fields' => array(
23 'nid' => array( 'type' => 'int', 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t('Node id reference')),
24 'uid' => array( 'type' => 'int', 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t('User id reference')),
25 'status' => array( 'type' => 'int', 'size' => 'small', 'unsigned' => FALSE, 'not null' => TRUE, 'description' => t('user approval status: -1 pending, 0 not approved, 1 approved'))
26 ),
27 'primary key' => array('nid','uid')
28 );
29
30 $schema['node_status'] = array(
31 'description' => t('Stores overal node approval status if necessary'),
32 'fields' => array(
33 'nid' => array( 'type' => 'int', 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t('Node id reference')),
34 'status' => array( 'type' => 'int', 'size' => 'small', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t('node approval status: 0 not approved, 1 approved'))
35 ),
36 'primary key' => array('nid')
37 );
38
39 return $schema;
40 } // function og_node_approval_schema
41

  ViewVC Help
Powered by ViewVC 1.1.2