Storm, the main SuiteDesk module
This commit is contained in:
parent
82d3282b44
commit
bcf9ace539
422 changed files with 62462 additions and 0 deletions
57
sites/all/modules/storm/stormperson/stormperson.install
Normal file
57
sites/all/modules/storm/stormperson/stormperson.install
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
function stormperson_install() {
|
||||
drupal_install_schema('stormperson');
|
||||
variable_set('node_options_stormperson', array('status'));
|
||||
}
|
||||
|
||||
function stormperson_disable() {
|
||||
drupal_set_message(t('Nodes of type "Person" have not been deleted on disabling SuiteDesk Person. Please note that they will now have reduced functionality, and will not be protected by SuiteDesk Person access controls.'), 'warning');
|
||||
}
|
||||
|
||||
function stormperson_uninstall() {
|
||||
drupal_uninstall_schema('stormperson');
|
||||
}
|
||||
|
||||
function stormperson_schema() {
|
||||
$schema['stormperson'] = array(
|
||||
'fields' => array(
|
||||
'vid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
|
||||
'nid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
|
||||
'organization_nid' => array('type' => 'int'),
|
||||
'organization_title' => array('type' => 'varchar', 'length' => 150),
|
||||
'prefix' => array('type' => 'varchar', 'length' => 100),
|
||||
'fullname' => array('type' => 'varchar', 'length' => 100),
|
||||
'email' => array('type' => 'varchar', 'length' => 50),
|
||||
'www' => array('type' => 'varchar', 'length' => 100),
|
||||
'phone' => array('type' => 'varchar', 'length' => 100),
|
||||
'im' => array('type' => 'varchar', 'length' => 100),
|
||||
'user_uid' => array('type' => 'int'),
|
||||
),
|
||||
'primary key' => array('vid'),
|
||||
'indexes' => array(
|
||||
'nid' => array('nid'),
|
||||
'organization_nid' => array('organization_nid'),
|
||||
'user_uid' => array('user_uid'),
|
||||
),
|
||||
);
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve primary keys and indexes
|
||||
*/
|
||||
function stormperson_update_6201() {
|
||||
$return = array();
|
||||
db_drop_primary_key($return, 'stormperson');
|
||||
db_add_primary_key($return, 'stormperson', array('vid'));
|
||||
db_add_index($return, 'stormperson', 'nid', array('nid'));
|
||||
db_add_index($return, 'stormperson', 'organization_nid', array('organization_nid'));
|
||||
db_add_index($return, 'stormperson', 'user_uid', array('user_uid'));
|
||||
return $return;
|
||||
}
|
Reference in a new issue