From 0167370c98cc30959bf50276a9e2b102ad529710 Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Fri, 15 Apr 2011 18:13:01 +0000 Subject: [PATCH] Split out Ding-specific code. --- mkdru.install | 3 --- mkdru.module | 75 --------------------------------------------------------- 2 files changed, 78 deletions(-) diff --git a/mkdru.install b/mkdru.install index 3f7d0a7..29b5b95 100644 --- a/mkdru.install +++ b/mkdru.install @@ -1,5 +1,4 @@ - array( - 'settings' => json_encode(variable_get('mkdru_ding', NULL)), - 'pz2_path' => variable_get('pz2_path', '/pazpar2/search.pz2'), - 'query' => $keys - ) - ), 'setting'); - return array("content" => $html, "title" => "Meta Search"); -} - /** * Implements hook_perm() */ @@ -71,31 +46,6 @@ function mkdru_access($op, $node, $account) { * Implements hook_menu() */ function mkdru_menu() { - // Can't get tabbed menus to work in D6. The children work and the tabs - // show up there but the top level's url results in it trying to find - // the system module's system.inc in mkdru's directory -// $items['admin/settings/mkdru'] = array( -// 'title' => 'Pazpar2 Metasearch Settings', -// 'description' => 'Settings for mkdru.', -// 'access arguments' => array('administer site configuration'), -// ); -// $items['admin/settings/mkdru/settings'] = array( -// 'title' => 'Settings', -// 'description' => 'Settings for mkdru.', -// 'page callback' => 'drupal_get_form', -// 'page arguments' => array('mkdru_admin_settings'), -// 'type' => MENU_DEFAULT_LOCAL_TASK, -// 'file' => 'mkdru.admin.inc', -// 'weight' => 0, -// ); -// $items['admin/settings/mkdru/ding'] = array( -// 'title' => 'Ding Integration', -// 'description' => 'Search settings for mkdru instance integrated into Ding.', -// 'page callback' => 'drupal_get_form', -// 'page arguments' => array('mkdru_ding_settings'), -// 'type' => MENU_LOCAL_TASK, -// 'weight' => 1, -// ); $items['admin/settings/mkdru'] = array( 'title' => 'Pazpar2 Metasearch Settings', 'description' => 'Settings for mkdru.', @@ -105,14 +55,6 @@ function mkdru_menu() { 'type' => MENU_NORMAL_ITEM, 'file' => 'mkdru.admin.inc', ); - $items['admin/settings/mkdru-ding'] = array( - 'title' => 'Pazpar2 Metasearch Ding Integration', - 'description' => 'Search settings for mkdru instance integrated into Ding.', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('mkdru_ding_settings'), - 'access arguments' => array('administer site configuration'), - 'type' => MENU_NORMAL_ITEM, - ); $items['ahah-mkdru-facet'] = array( 'page callback' => 'mkdru_add_facet_callback', 'access arguments' => array('create metasearch interface'), @@ -320,23 +262,6 @@ function mkdru_add_facet_callback() { -// Ding config -function mkdru_ding_settings(&$form_state) { - $form_state['build_info']['args']['settings'] = variable_get('mkdru_ding', NULL); - $form = drupal_retrieve_form('mkdru_settings_form', &$form_state); - $form['settings']['#title'] = t('Default search settings'); - $form['submit'] = array( - '#type' => 'submit', - '#value' => 'Save configuration', - ); - return $form; -} -function mkdru_ding_settings_submit($form, &$form_state) { - variable_set('mkdru_ding', $form_state['values']['settings']); - drupal_set_message(t('The configuration options have been saved.')); -} - - // Node config /** -- 1.7.10.4