'not null' => TRUE,
'default' => 0
),
- 'pz2_path' => array(
+ 'settings' => array(
'type' => 'text',
'not null' => TRUE,
- 'description' => t('Path to Pazpar2 or Service Proxy.')
- ),
- 'use_sessions' => array(
- 'description' => t('Session handling toggle.'),
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- 'source_max' => array(
- 'description' => t('Number of sources to display'),
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- 'author_max' => array(
- 'description' => t('Number of authors to display'),
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- 'subject_max' => array(
- 'description' => t('Number of subjects to display'),
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- 'sp_user' => array(
- 'type' => 'text',
- 'not null' => FALSE,
- 'description' => t('Service Proxy username')
- ),
- 'sp_pass' => array(
- 'type' => 'text',
- 'not null' => FALSE,
- 'description' => t('Service Proxy password')
+ 'description' => 'Metasearch settings',
),
),
'primary key' => array('nid', 'vid'),
variable_set('comment_mkdru', COMMENT_NODE_DISABLED);
// Create table.
drupal_install_schema('mkdru');
+ // Default settings
+ $settings['pz2_path'] = "/pazpar2/search.pz2";
+ $settings['use_sessions'] = 1;
+ $settings['sp']['user'] = "";
+ $settings['sp']['pass'] = "";
+ $settings['facets']['source']['displayName'] = "Source";
+ $settings['facets']['source']['pz2Name'] = "xtargets";
+ $settings['facets']['source']['limiter'] = NULL;
+ $settings['facets']['source']['multiLimit'] = NULL;
+ $settings['facets']['source']['max'] = 10;
+ $settings['facets']['source']['orderWeight'] = 1;
+ $settings['facets']['subject']['displayName'] = "Subject";
+ $settings['facets']['subject']['pz2Name'] = "subject";
+ $settings['facets']['subject']['limiter'] = "su";
+ $settings['facets']['subject']['multiLimit'] = TRUE;
+ $settings['facets']['subject']['max'] = 10;
+ $settings['facets']['subject']['orderWeight'] = 2;
+ $settings['facets']['author']['displayName'] = "Author";
+ $settings['facets']['author']['pz2Name'] = "author";
+ $settings['facets']['author']['limiter'] = "au";
+ $settings['facets']['author']['multiLimit'] = FALSE;
+ $settings['facets']['author']['max'] = 10;
+ $settings['facets']['author']['orderWeight'] = 3;
+ variable_set('mkdru_defaults', $settings);
+ variable_set('mkdru_ding', $settings);
}
/**
drupal_uninstall_schema('mkdru');
// Delete variables
variable_del('pz2_js_path');
-}
-
-function mkdru_update_6100() {
- $ret = array();
- db_add_field($ret, 'mkdru', 'sp_user', array('type' => 'varchar', 'length' => 32, 'not null' => FALSE, 'default' => '') );
- db_add_field($ret, 'mkdru', 'sp_pass', array('type' => 'varchar', 'length' => 32, 'not null' => FALSE, 'default' => '') );
- return $ret;
-}
+ variable_del('mkdru_defaults');
+ variable_del('mkdru_ding');
+}
\ No newline at end of file