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

Contents of /contributions/modules/comment_alter_taxonomy/comment_alter_taxonomy.install

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


Revision 1.4 - (show annotations) (download) (as text)
Mon Jan 26 18:31:01 2009 UTC (10 months ago) by damz
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-RC1, HEAD
Changes since 1.3: +39 -26 lines
File MIME type: text/x-php
First port of the module to Drupal 6.
1 <?php
2 // $Id: comment_alter_taxonomy.install,v 1.3 2009/01/04 22:02:31 damz Exp $
3
4 /**
5 * @file
6 * Installation functions for comment_alter_taxonomy.
7 */
8
9 function comment_alter_taxonomy_install() {
10 // Create the database tables.
11 drupal_install_schema('comment_alter_taxonomy');
12
13 // Set weight of comment_alter_taxonomy module to be heavier than taxonomy module.
14 db_query("UPDATE {system} SET weight = 1 WHERE name = 'comment_alter_taxonomy'");
15 }
16
17 /**
18 * Implementation of hook_uninstall().
19 */
20 function comment_alter_taxonomy_uninstall() {
21 // Remove the database tables.
22 drupal_uninstall_schema('comment_alter_taxonomy');
23
24 // Delete settings variables.
25 variable_del('comment_alter_taxonomy_vocabularies');
26 }
27
28 /**
29 * Implementation of hook_schema().
30 */
31 function comment_alter_taxonomy_schema() {
32 $schema['comment_alter_taxonomy'] = array(
33 'fields' => array(
34 'nid' => array(
35 'type' => 'int',
36 'unsigned' => TRUE,
37 'not null' => TRUE,
38 'description' => 'The {node}.nid of the node.',
39 ),
40 'cid' => array(
41 'type' => 'int',
42 'unsigned' => TRUE,
43 'not null' => TRUE,
44 'description' => 'The {comment}.cid of the comment.',
45 ),
46 'tid' => array(
47 'type' => 'int',
48 'unsigned' => TRUE,
49 'not null' => TRUE,
50 'description' => 'The {term_data}.tid of a term.',
51 ),
52 ),
53 'primary key' => array('nid', 'cid', 'tid'),
54 );
55 return $schema;
56 }
57

  ViewVC Help
Powered by ViewVC 1.1.2