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

Contents of /contributions/modules/flag_weights/flag_weights.install

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


Revision 1.2 - (show annotations) (download) (as text)
Thu Oct 9 12:00:00 2008 UTC (13 months, 2 weeks ago) by lyricnz
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
Changes since 1.1: +3 -2 lines
File MIME type: text/x-php
Update file comment
1 <?php
2 // $Id: flag_weights.install,v 1.1 2008/10/09 10:19:50 lyricnz Exp $
3
4 /**
5 * @file
6 * Add a weight field to existing table 'flag_content' from Flag module.
7 */
8
9 /**
10 * Implementation of hook_install().
11 */
12 function flag_weights_install() {
13 // Add a field to the existing flag_content table (Flag module)
14 $field = array(
15 'type' => 'int',
16 'not null' => TRUE,
17 'default' => 0,
18 'size' => 'tiny',
19 'initial' => 0, // Sets initial value for preexisting nodes.
20 // 'description' => t('Flag weight within region.'),
21 );
22
23 $ret = array();
24 db_add_field($ret, 'flag_content', 'weight', $field);
25 }
26
27
28 /**
29 * Implementation of hook_uninstall().
30 */
31 function flag_weights_uninstall() {
32 $ret = array();
33 db_drop_field($ret, 'flag_content', 'weight');
34 }
35

  ViewVC Help
Powered by ViewVC 1.1.2