| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_install().
|
| 6 |
*/
|
| 7 |
function joomla_install() {
|
| 8 |
// Create tables.
|
| 9 |
drupal_install_schema('joomla');
|
| 10 |
}
|
| 11 |
|
| 12 |
/**
|
| 13 |
* Implementation of hook_uninstall().
|
| 14 |
*/
|
| 15 |
function joomla_uninstall() {
|
| 16 |
// Remove tables.
|
| 17 |
drupal_uninstall_schema('joomla');
|
| 18 |
|
| 19 |
vaiable_del('joomla_database');
|
| 20 |
vaiable_del('joomla_delay_row');
|
| 21 |
vaiable_del('joomla_delay_sec');
|
| 22 |
vaiable_del('joomla_img_folder');
|
| 23 |
vaiable_del('joomla_input_format');
|
| 24 |
vaiable_del('joomla_path');
|
| 25 |
vaiable_del('joomla_prefix');
|
| 26 |
vaiable_del('joomla_update_duplicate');
|
| 27 |
}
|
| 28 |
|
| 29 |
/**
|
| 30 |
* Implementation of hook_schema().
|
| 31 |
*/
|
| 32 |
function joomla_schema() {
|
| 33 |
$schema['joomla_users'] = array(
|
| 34 |
'description' => 'Stores the original Joomla user ID and password and links to the {users} table',
|
| 35 |
'fields' => array(
|
| 36 |
'uid' => array(
|
| 37 |
'type' => 'int',
|
| 38 |
'unsigned' => TRUE,
|
| 39 |
'not null' => TRUE,
|
| 40 |
'default' => 0,
|
| 41 |
'description' => "The users {users}.uid.",
|
| 42 |
),
|
| 43 |
'juid' => array(
|
| 44 |
'type' => 'int',
|
| 45 |
'unsigned' => TRUE,
|
| 46 |
'not null' => TRUE,
|
| 47 |
'default' => 0,
|
| 48 |
'description' => "The users id from the Joomla database.",
|
| 49 |
),
|
| 50 |
'password' => array(
|
| 51 |
'type' => 'varchar',
|
| 52 |
'length' => 100,
|
| 53 |
'not null' => TRUE,
|
| 54 |
'default' => '',
|
| 55 |
'description' => "The users original Joomla password.",
|
| 56 |
),
|
| 57 |
'converted' => array(
|
| 58 |
'type' => 'int',
|
| 59 |
'unsigned' => TRUE,
|
| 60 |
'not null' => TRUE,
|
| 61 |
'default' => 0,
|
| 62 |
'description' => "Boolean value storing whether or not the users Joomla password has been converted to an entry in the {users}.pass table.",
|
| 63 |
),
|
| 64 |
),
|
| 65 |
'primary key' => array('uid'),
|
| 66 |
'unique keys' => array(
|
| 67 |
'juid' => array('juid'),
|
| 68 |
),
|
| 69 |
);
|
| 70 |
|
| 71 |
return $schema;
|
| 72 |
}
|