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

Diff of /contributions/modules/pcp/pcp.install

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

revision 1.1.2.1, Thu Oct 16 22:34:50 2008 UTC revision 1.1.2.2, Fri Oct 17 20:45:03 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: pcp.install,v 1.1 2008/10/09 21:49:20 nrussell Exp $  // $Id$
3    
4  /**  /**
5   * @file   * @file
6   * Install file for the profile.module   * Install file for the profile.module
7   */   */
8    
9    
10  /**  /**
11   * Implementation of hook_install()  * Implementation of hook_install().
12   */  */
13  function pcp_install() {  function pcp_install() {
14    drupal_set_message('Installing Profile Complete Percentages');    drupal_install_schema('pcp');
15    switch ($GLOBALS['db_type']) {  }
16      case 'mysql':  
17      case 'mysqli':  /**
18        db_query("CREATE TABLE {profile_pcp} (   * Implementation of hook_schema()
19                                  fid INT NOT NULL   */
20                                  )");  function pcp_schema() {
21        break;    $schema['profile_pcp'] = array(
22    }      'fields' => array(
23          'fid' => array('type' => 'int', 'not null' => TRUE),
24          ),
25        );
26      return $schema;
27  }  }
28    
29  function pcp_uninstall() {  function pcp_uninstall() {
30    if (db_table_exists('profile_pcp')) {    drupal_uninstall_schema('pcp');
     db_query("DROP TABLE {profile_pcp}");  
   }  
31  }  }

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.2