5 * Install, update and uninstall functions.
9 * Implements hook_schema().
11 function mkdru_schema() {
12 $schema['mkdru'] = array(
13 'description' => t('Stores settings for mkdru nodes.'),
16 'description' => t('The primary identifier for a node.'),
23 'description' => t('The current {node_revisions}.vid version identifier.'),
32 'description' => t('Path to Pazpar2 or Service Proxy.')
34 'use_sessions' => array(
35 'description' => t('Session handling toggle.'),
40 'source_max' => array(
41 'description' => t('Number of sources to display'),
46 'author_max' => array(
47 'description' => t('Number of authors to display'),
52 'subject_max' => array(
53 'description' => t('Number of subjects to display'),
61 'description' => t('Service Proxy username')
66 'description' => t('Service Proxy password')
69 'primary key' => array('nid', 'vid'),
70 'unique keys' => array('vid' => array('vid')),
71 'indexes' => array('nid' => array('nid')),
77 * Implements hook_install().
79 function mkdru_install() {
80 // Disable comments by default
81 variable_set('comment_mkdru', COMMENT_NODE_DISABLED);
83 drupal_install_schema('mkdru');
87 * Implements hook_uninstall().
89 function mkdru_uninstall() {
91 drupal_uninstall_schema('mkdru');
93 variable_del('pz2_js_path');
96 function mkdru_update_6100() {
98 db_add_field($ret, 'mkdru', 'sp_user', array('type' => 'varchar', 'length' => 32, 'not null' => FALSE, 'default' => '') );
99 db_add_field($ret, 'mkdru', 'sp_pass', array('type' => 'varchar', 'length' => 32, 'not null' => FALSE, 'default' => '') );