/[drupal]/contributions/modules/countries_api/contrib/continents_api/continents_api.install
ViewVC logotype

Diff of /contributions/modules/countries_api/contrib/continents_api/continents_api.install

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

revision 1.1, Sat Jul 18 09:26:52 2009 UTC revision 1.1.2.1, Sat Jul 18 09:26:52 2009 UTC
# Line 0  Line 1 
1    <?php
2    // $Id$
3    
4    /**
5     * @file
6     * Install file for Continents API.
7     */
8    
9    /**
10     * Implementation of hook_install().
11     */
12    function continents_api_install() {
13     switch ($GLOBALS['db_type']) {
14        case 'mysqli':
15        case 'mysql':
16          //create countries db
17          db_query("CREATE TABLE {continents_api_continents} (
18            continent char(2) NOT NULL,
19            country char(2) NOT NULL,
20            PRIMARY KEY (continent, country)
21          ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
22        break;
23      }
24      // Include continents_api module include for initial data import.
25      require_once(dirname(__FILE__) .'/continents_api.module');
26      continents_api_csv_import_continents();
27    }
28    
29    /**
30     * Implementation of hook_uninstall().
31     */
32    function continents_api_uninstall() {
33        db_query('DROP TABLE {continents_api_continents}');
34    }

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

  ViewVC Help
Powered by ViewVC 1.1.2