| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: false_account.install,v 1.3.4.1 2008/12/02 18:55:49 nunoveloso18 Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 12 |
function false_account_install() { |
function false_account_install() { |
| 13 |
$created = drupal_install_schema('false_account'); |
$created = drupal_install_schema('false_account'); |
| 14 |
|
|
| 15 |
if ($created['success']) { |
if ($created[0]['success']) { |
| 16 |
drupal_set_message(t('False Account module installed successfully.')); |
drupal_set_message(t('False Account module installed successfully.')); |
| 17 |
} |
} |
| 18 |
else { |
else { |
| 19 |
drupal_set_message(t('Table installation for the False Accounts module was unsuccessful.'), 'error'); |
drupal_set_message(t('Table installation for the False Accounts module was unsuccessful.'), 'error'); |
| 20 |
} |
} |
| 21 |
|
} |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
/** |
| 25 |
|
* Implementation of hook_uninstall(). |
| 26 |
|
*/ |
| 27 |
|
function false_account_uninstall() { |
| 28 |
|
drupal_uninstall_schema('false_account'); |
| 29 |
} |
} |
| 30 |
|
|
| 31 |
|
|
| 69 |
* Implementation of hook_schema() |
* Implementation of hook_schema() |
| 70 |
*/ |
*/ |
| 71 |
function false_account_schema() { |
function false_account_schema() { |
| 72 |
$schema['false_accounts'] = array( |
$schema['false_accounts'] = array( |
| 73 |
'fields' => array( |
'fields' => array( |
| 74 |
'cid' => array('type' => 'varchar', 'length' => '64', 'not null' => TRUE), |
'cid' => array('type' => 'varchar', 'length' => '64', 'not null' => TRUE), |
| 75 |
'uid' => array('type' => 'int', 'not null' => TRUE, 'disp-width' => '10'), |
'uid' => array('type' => 'int', 'not null' => TRUE, 'disp-width' => '10'), |
| 76 |
'created' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, |
'created' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, |
| 77 |
'disp-width' => '11'), |
'disp-width' => '11'), |
| 78 |
'status' => array('type' => 'int', 'unsigned' => TRUE, 'size' => 'tiny', 'not null' => TRUE, |
'status' => array('type' => 'int', 'unsigned' => TRUE, 'size' => 'tiny', 'not null' => TRUE, |
| 79 |
'default' => 0, 'disp-width' => '3') |
'default' => 0, 'disp-width' => '3') |
| 80 |
), |
), |
| 81 |
'primary key' => array('cid', 'uid'), |
'primary key' => array('cid', 'uid'), |
| 82 |
); |
); |
| 83 |
|
|
| 84 |
return $schema; |
return $schema; |
| 85 |
} |
} |