X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkdru.install;h=23d4de39050a1591d8ffffb6b0c4bcfa4cf1aef1;hb=56667175166fd1553aa05e4e2d08e1d77ea3e5ec;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=e4a8cff5ea6f81be77a9431ac7e7aa98b20b0248;p=mkdru-moved-to-drupal.org.git diff --git a/mkdru.install b/mkdru.install index e69de29..23d4de3 100644 --- a/mkdru.install +++ b/mkdru.install @@ -0,0 +1,90 @@ + 'Stores settings for mkdru nodes.', + 'fields' => array( + 'nid' => array( + 'description' => 'The primary identifier for a node.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0 + ), + 'vid' => array( + 'description' => 'The current {node_revisions}.vid version identifier.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0 + ), + 'pz2_path' => array( + 'type' => 'text', + 'not null' => TRUE, + 'description' => 'Path to Pazpar2 or Service Proxy.', + ), + 'use_sessions' => array( + 'description' => 'Session handling toggle.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + ), + 'source_max' => array( + 'description' => 'Number of sources to display', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + ), + 'author_max' => array( + 'description' => 'Number of authors to display', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + ), + 'subject_max' => array( + 'description' => 'Number of subjects to display', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + ), + 'sp_user' => array( + 'type' => 'text', + 'not null' => FALSE, + 'description' => 'Service Proxy username' + ), + 'sp_pass' => array( + 'type' => 'text', + 'not null' => FALSE, + 'description' => 'Service Proxy password' + ), + ), + 'primary key' => array('nid', 'vid'), + 'unique keys' => array('vid' => array('vid')), + 'indexes' => array('nid' => array('nid')), + ); + return $schema; +} + +/** +* Implements hook_install(). +*/ +function mkdru_install() { + // Disable comments by default + variable_set('comment_mkdru', COMMENT_NODE_DISABLED); +} + +/** +* Implements hook_uninstall(). +*/ +function mkdru_uninstall() { + // Delete variables + variable_del('pz2_js_path'); +} \ No newline at end of file