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

Diff of /contributions/modules/advogato_import/advogato_import.install

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

revision 1.1, Mon Nov 6 21:02:53 2006 UTC revision 1.2, Tue Jul 29 15:02:09 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: similar.install,v 1.3 2006/11/06 20:27:19 deekayen Exp $  // $Id: advogato_import.install,v 1.1 2006/11/06 21:02:53 deekayen Exp $
3    
4    /**
5     * Implementation of hook_install().
6     */
7  function advogato_import_install() {  function advogato_import_install() {
8    switch ($GLOBALS['db_type']) {    switch ($GLOBALS['db_type']) {
9      case 'mysql':      case 'mysql':
10      case 'mysqli':      case 'mysqli':
11        db_query("CREATE TABLE advogato_import (        db_query("CREATE TABLE {advogato_import} (
12          qid int(10) unsigned NOT NULL auto_increment,          qid int(10) unsigned NOT NULL auto_increment,
13          uid int(10) unsigned NOT NULL default '0',          uid int(10) unsigned NOT NULL default '0',
14          username varchar(50) NOT NULL default '',          username varchar(50) NOT NULL default '',
15          startentry mediumint(5) NOT NULL default '0',          startentry mediumint(5) NOT NULL default '0',
16          endentry mediumint(5) NOT NULL default '0',          endentry mediumint(5) NOT NULL default '0',
17          PRIMARY KEY (qid),          PRIMARY KEY (qid),
18          KEY uid (uid)");          KEY uid (uid))"
19          );
20    }    }
21    }
22    
23    /**
24     * Implementation of hook_uninstall().
25     */
26    function advogato_import_uninstall() {
27      switch ($GLOBALS['db_type']) {
28        case 'mysql':
29        case 'mysqli':
30          db_query("DROP TABLE {advogato_import}");
31      }
32      variable_del('advogato_import_cron_limit');
33      variable_del('advogato_import_node_type');
34      variable_del('advogato_import_status');
35      variable_del('advogato_import_moderation_queue');
36      variable_del('advogato_import_promoted');
37      variable_del('advogato_import_sticky');
38      variable_del('advogato_import_comment');
39      variable_del('advogato_import_xmlrpc');
40      variable_del('advogato_import_configured');
41  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.2