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

Contents of /contributions/modules/drupalvb/drupalvb.install

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


Revision 1.11 - (show annotations) (download) (as text)
Sun Feb 1 02:00:25 2009 UTC (9 months, 3 weeks ago) by sun
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +2 -2 lines
File MIME type: text/x-php
#334521 by sun: Fixed fatal error on path drupalvb/logout.
1 <?php
2 // $Id: drupalvb.install,v 1.10 2008/10/18 17:09:35 sun Exp $
3
4 /**
5 * Implementation of hook_schema().
6 */
7 function drupalvb_schema() {
8 $schema['drupalvb_users'] = array(
9 'fields' => array(
10 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
11 'userid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
12 ),
13 'primary key' => array('uid'),
14 'unique keys' => array(
15 'userid' => array('userid'),
16 ),
17 );
18
19 return $schema;
20 }
21
22 /**
23 * Implementation of hook_install().
24 */
25 function drupalvb_install() {
26 drupal_install_schema('drupalvb');
27 }
28
29 /**
30 * Implementation of hook_uninstall().
31 */
32 function drupalvb_uninstall() {
33 drupal_uninstall_schema('drupalvb');
34 db_query("DELETE FROM {variable} WHERE name LIKE 'drupalvb_%%'");
35 }
36
37 /**
38 * Move vB database url from settings.php into a variable.
39 */
40 function drupalvb_update_5100() {
41 global $db_url;
42
43 $ret = array();
44 if (is_array($db_url) && !empty($db_url['vbulletin'])) {
45 variable_set('drupalvb_db', $db_url['vbulletin']);
46 }
47 else {
48 variable_set('drupalvb_db', $db_url);
49 }
50 module_load_include('inc.php', 'drupalvb');
51 $config = drupalvb_get_config();
52 variable_set('drupalvb_db_prefix', $config['Database']['tableprefix']);
53 return $ret;
54 }
55

  ViewVC Help
Powered by ViewVC 1.1.2