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

Diff of /contributions/modules/follow/follow.install

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

revision 1.2, Fri Oct 30 21:09:28 2009 UTC revision 1.3, Mon Nov 2 20:25:53 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: follow.install,v 1.1.2.1 2009/04/29 20:37:20 q0rban Exp $  // $Id: follow.install,v 1.2 2009/10/30 21:09:28 pwolanin Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 10  Line 10 
10   * Implementation of hook_install().   * Implementation of hook_install().
11   */   */
12  function follow_install() {  function follow_install() {
13    drupal_install_schema('follow');    return;
14      // @todo: Add a default link to this site's node RSS feed.
15      db_insert('follow_links')
16        ->fields(array(
17          'name' => 'self',
18          'url' => 'rss.xml',
19          'uid' => 0,
20          'weight' => 0,
21        ))
22        ->execute();
23  }  }
24    
25  /**  /**
# Line 18  function follow_install() { Line 27  function follow_install() {
27   */   */
28  function follow_schema() {  function follow_schema() {
29    $schema['follow_links'] = array(    $schema['follow_links'] = array(
30      'description' => t('Stores sitewide and user follow links.'),      'description' => 'Stores sitewide and user follow links.',
31      'fields' => array(      'fields' => array(
32        'lid' => array(        'lid' => array(
33          'type' => 'serial',          'type' => 'serial',
34          'unsigned' => TRUE,          'unsigned' => TRUE,
35          'not null' => TRUE,          'not null' => TRUE,
36          'description' => t('Unique identifier for the {follow_links}.'),          'description' => 'Unique identifier for the {follow_links}.',
37        ),        ),
38        'name' => array(        'name' => array(
39          'type' => 'varchar',          'type' => 'varchar',
40          'length' => 255,          'length' => 255,
41          'not null' => TRUE,          'not null' => TRUE,
42          'default' => '',          'default' => '',
43          'description' => t("The machine name of the {follow_links}."),          'description' => "The machine name of the {follow_links}.",
44        ),        ),
45        'uid' => array(        'uid' => array(
46          'type' => 'int',          'type' => 'int',
# Line 51  function follow_schema() { Line 60  function follow_schema() {
60          'not null' => TRUE,          'not null' => TRUE,
61          'default' => 0,          'default' => 0,
62          'size' => 'tiny',          'size' => 'tiny',
63          'description' => t('The weight of this {follow_links}.'),          'description' => 'The weight of this {follow_links}.',
64        ),        ),
65      ),      ),
66      'primary key' => array('lid'),      'primary key' => array('lid'),
# Line 66  function follow_schema() { Line 75  function follow_schema() {
75   * Implementation of hook_uninstall().   * Implementation of hook_uninstall().
76   */   */
77  function follow_uninstall() {  function follow_uninstall() {
   drupal_uninstall_schema('follow');  
78    variable_del('follow_user_block_title');    variable_del('follow_user_block_title');
79    variable_del('follow_site_block_title');    variable_del('follow_site_block_title');
80    variable_del('follow_site_block_user');    variable_del('follow_site_block_user');
81    }
82    
83    function follow_update_7000() {
84    cache_clear_all('follow:networks', 'cache');    cache_clear_all('follow:networks', 'cache');
85      return array();
86  }  }
87    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2