5 * Install, update and uninstall functions.
9 * Implements hook_schema().
11 function mkdru_schema() {
12 $schema['mkdru'] = array(
13 'description' => 'Stores settings for mkdru nodes.',
16 'description' => 'The primary identifier for a node.',
23 'description' => 'The current {node_revisions}.vid version identifier.',
32 'description' => 'Path to Pazpar2 or Service Proxy.',
34 'use_sessions' => array(
35 'description' => 'Session handling toggle.',
40 'source_max' => array(
41 'description' => 'Number of sources to display',
46 'author_max' => array(
47 'description' => 'Number of authors to display',
52 'subject_max' => array(
53 'description' => 'Number of subjects to display',
61 'description' => 'Service Proxy username'
66 'description' => '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_HIDDEN);
83 $facets = array('source', 'subject', 'author');
84 variable_set('mkdru_facets', $facets);
85 // Restrict facet block visibility
86 foreach ($facets as $facet) {
87 db_insert('block_node_type')
90 'delta' => 'mkdru_facet_' . $facet,
91 'type' => 'mkdru'))->execute();
96 * Implements hook_uninstall().
98 function mkdru_uninstall() {
100 variable_del('pz2_js_path');
101 // Clear block visibility
102 db_delete('block_node_type')->condition('module', 'mkdru')->execute();