From: Jason Skomorowski Date: Thu, 10 Feb 2011 22:50:00 +0000 (+0100) Subject: Replace awkward SQL with underdocumented Drupal func. X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=b8111152723a2cda25a38e7b9dd6352fce9cd607;p=mkdru-moved-to-drupal.org.git Replace awkward SQL with underdocumented Drupal func. --- diff --git a/mkdru.module b/mkdru.module index 6fb792a..a68fc93 100644 --- a/mkdru.module +++ b/mkdru.module @@ -117,28 +117,35 @@ function mkdru_form(&$node, $form_state) { '#required' => TRUE, '#default_value' => isset($node->mkdru->pz2_path) ? $node->mkdru->pz2_path : '/pazpar2/search.pz2', ); - $form['search_settings']['sp_user'] = array( + $form['search_settings']['use_sessions'] = array( + '#type' => 'checkbox', + '#title' => t('Session handling'), + '#description' => t('Disable for use with Service Proxy'), + '#default_value' => isset($node->mkdru->use_sessions) ? $node->mkdru->use_sessions : 1, + ); + + $form['sp_settings'] = array( + '#type' => 'fieldset', + '#title' => t('Service Proxy specific settings'), + '#collapsible' => TRUE, + '#collapsed' => TRUE + ); + $form['sp_settings']['sp_user'] = array( '#type' => 'textfield', - '#title' => t('Service Proxy username (optional)'), - '#description' => t('Service-Proxy username'), + '#title' => t('Service Proxy username'), + '#description' => t('Service Proxy username'), '#required' => FALSE, '#default_value' => isset($node->mkdru->sp_user) ? $node->mkdru->sp_user : '', ); - $form['search_settings']['sp_pass'] = array( + $form['sp_settings']['sp_pass'] = array( '#type' => 'textfield', - '#title' => t('Service Proxy password (optional)'), - '#description' => t('Service-Proxy password'), + '#title' => t('Service Proxy password'), + '#description' => t('Service Proxy password'), '#required' => FALSE, '#default_value' => isset($node->mkdru->sp_pass) ? $node->mkdru->sp_pass : '', ); - $form['search_settings']['use_sessions'] = array( - '#type' => 'checkbox', - '#title' => t('Session handling'), - '#description' => t('Disable for use with Service Proxy'), - '#default_value' => isset($node->mkdru->use_sessions) ? $node->mkdru->use_sessions : 1, - ); $form['display_settings'] = array( '#type' => 'fieldset',