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

Diff of /contributions/modules/comment_subscribe/comment_subscribe.install

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

revision 1.2.2.2, Thu Jan 8 10:57:35 2009 UTC revision 1.2.2.3, Fri Jan 30 08:23:50 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: comment_subscribe.install,v 1.2.2.1 2008/12/22 09:40:51 zyxware Exp $  // $Id: comment_subscribe.install,v 1.2 2008/03/06 08:08:20 zyxware Exp $
3    /**
4     * @file
5     * comment_subscribe.install.
6     */
7    
8  /**  /**
9   * Implementation of hook_install().   * Implementation of hook_install().
# Line 15  function comment_subscribe_install() { Line 18  function comment_subscribe_install() {
18  function comment_subscribe_uninstall() {  function comment_subscribe_uninstall() {
19    // Remove tables.    // Remove tables.
20    drupal_uninstall_schema('comment_subscribe');    drupal_uninstall_schema('comment_subscribe');
21          variable_del('comment_subscribe_default_mailtext');    variable_del('comment_subscribe_default_mailtext');
22          variable_del('comment_subscribe_default_anon_mailalert');    variable_del('comment_subscribe_default_anon_mailalert');
23          variable_del('comment_subscribe_regged_checkbox');    variable_del('comment_subscribe_regged_checkbox');
24          variable_del('comment_subscribe_node_alert');    variable_del('comment_subscribe_node_alert');
25  }  }
26  /**  /**
27   * Implementation of hook_schema().   * Implementation of hook_schema().
# Line 41  function comment_subscribe_schema() { Line 44  function comment_subscribe_schema() {
44        'parents' => array(        'parents' => array(
45          'type' => 'varchar',          'type' => 'varchar',
46          'length' => 255,          'length' => 255,
47          'description' => t('Comma-separated list of cid\' s '),          'description' => t('Comma-separated list of recipient e-mail addresses.'),
48        ),        ),
49        'subscribe' => array(        'subscribe' => array(
50          'type' => 'int',          'type' => 'int',
51          'not null' => TRUE,          'not null' => TRUE,
52          'default' => 1,          'default' => 1,
53                                  'size' => 'tiny',          'size' => 'tiny',
54          'description' => t('Subscribe status value if comment replies is selected.'),          'description' => t('Subscribe status value if comment replies is selected.'),
55        ),        ),
56        'subscribenode' => array(        'subscribenode' => array(
# Line 76  function comment_subscribe_schema() { Line 79  function comment_subscribe_schema() {
79          'type' => 'int',          'type' => 'int',
80          'not null' => TRUE,          'not null' => TRUE,
81          'default' => 0,          'default' => 0,
82                  'size' => 'tiny',      'size' => 'tiny',
83          'description' => t('Subscribe status value if comment replies is selected in node.'),          'description' => t('Subscribe status value if comment replies is selected in node.'),
84        )        )
85      )      )
86    );    );
   
87    return $schema;    return $schema;
88  }  }
89    
90  function comment_subscribe_update_6100() {  function comment_subscribe_update_6() {
91    $schema['z_nodesubscribe'] = array(    $schema['z_nodesubscribe'] = array(
92      'description' => t('Node comments subscribe id.'),      'description' => t('Node comments subscribe id.'),
93      'fields' => array(      'fields' => array(
# Line 102  function comment_subscribe_update_6100() Line 104  function comment_subscribe_update_6100()
104          'type' => 'int',          'type' => 'int',
105          'not null' => TRUE,          'not null' => TRUE,
106          'default' => 0,          'default' => 0,
107                  'size' => 'tiny',      'size' => 'tiny',
108          'description' => t('Subscribe status value if comment replies is selected in node.'),          'description' => t('Subscribe status value if comment replies is selected in node.'),
109        )        )
110      )      )
111    );    );
112    $ret = array();    $ret = array();
113    db_create_table($ret, 'z_nodesubscribe', $schema['z_nodesubscribe']);    db_create_table($ret, 'z_nodesubscribe', $schema['z_nodesubscribe']);
114    db_query("INSERT INTO z_nodesubscribe (nid, uid) select nid,uid from node");    db_query("INSERT INTO {z_nodesubscribe} (nid, uid) select nid,uid from node");
115    return $ret;    return $ret;
116  }  }

Legend:
Removed from v.1.2.2.2  
changed lines
  Added in v.1.2.2.3

  ViewVC Help
Powered by ViewVC 1.1.2