From efd11617177f35ba80f4e1e0ddf096823292397c Mon Sep 17 00:00:00 2001 From: ppound Date: Mon, 8 Nov 2021 15:30:11 -0400 Subject: [PATCH] solr site search module installs successfully and admin form works --- .../Plugin/Block/RoblibSearchEdsArticles.php | 1 - .../src/Plugin/Block/RoblibSearchEdsBooks.php | 3 +- .../solr_site/roblib_search_solr_site.info | 8 - .../roblib_search_solr_site.info.yml | 8 + .../solr_site/roblib_search_solr_site.install | 2 - .../roblib_search_solr_site.libraries.yml | 10 + .../solr_site/roblib_search_solr_site.module | 318 +----------------- .../roblib_search_solr_site.routing.yml | 24 ++ .../RoblibSearchSolrsiteController.php | 70 ++++ .../src/Form/SolrsiteSettingsForm.php | 85 +++++ .../Block/RoblibSearchSolrsiteBestbet.php | 39 +++ .../Block/RoblibSearchSolrsiteGeneral.php | 40 +++ ...roblib-search-solr-site-results.html.twig} | 0 .../solr_site/{theme => templates}/theme.inc | 0 roblib_search.module | 3 + .../Block/RoblibSearchOtherSourcesBlock.php | 34 ++ .../roblib-search-other-sources.html.twig | 16 +- theme/theme.inc | 4 +- 18 files changed, 335 insertions(+), 330 deletions(-) delete mode 100755 modules/solr_site/roblib_search_solr_site.info create mode 100644 modules/solr_site/roblib_search_solr_site.info.yml delete mode 100755 modules/solr_site/roblib_search_solr_site.install create mode 100644 modules/solr_site/roblib_search_solr_site.libraries.yml create mode 100644 modules/solr_site/roblib_search_solr_site.routing.yml create mode 100644 modules/solr_site/src/Controller/RoblibSearchSolrsiteController.php create mode 100644 modules/solr_site/src/Form/SolrsiteSettingsForm.php create mode 100644 modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteBestbet.php create mode 100644 modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteGeneral.php rename modules/solr_site/{theme/roblib-search-solr-site-results.tpl.php => templates/roblib-search-solr-site-results.html.twig} (100%) rename modules/solr_site/{theme => templates}/theme.inc (100%) create mode 100644 src/Plugin/Block/RoblibSearchOtherSourcesBlock.php rename theme/roblib-search-other-sources.tpl.php => templates/roblib-search-other-sources.html.twig (52%) diff --git a/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsArticles.php b/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsArticles.php index 3aa9950..7693380 100644 --- a/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsArticles.php +++ b/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsArticles.php @@ -30,7 +30,6 @@ class RoblibSearchEdsArticles extends BlockBase { return [ '#theme' => 'roblib_search_eds_articles', 'query' => $query, - 'spinner_path' => 'test', '#attached' => [ 'library' => [ 'roblib_search_eds/eds-article' diff --git a/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsBooks.php b/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsBooks.php index 250f9a7..8fd1b29 100644 --- a/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsBooks.php +++ b/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsBooks.php @@ -29,8 +29,7 @@ class RoblibSearchEdsBooks extends BlockBase { ]; return [ '#theme' => 'roblib_search_eds_books', - 'query' => $query, - 'spinner_path' => 'test', + //'query' => $query, '#attached' => [ 'library' => [ 'roblib_search_eds/eds-book' diff --git a/modules/solr_site/roblib_search_solr_site.info b/modules/solr_site/roblib_search_solr_site.info deleted file mode 100755 index 8e3b4b6..0000000 --- a/modules/solr_site/roblib_search_solr_site.info +++ /dev/null @@ -1,8 +0,0 @@ -name = Roblib Search Solr site -dependencies[] = roblib_search -configure = admin/roblib_search/solr_site_search -description = implements the Roblib Search local Solr site bento results -package = Roblib Search -version = 7.x-dev -core = 7.x -stylesheets[all][] = css/roblib_search_solr_site.css \ No newline at end of file diff --git a/modules/solr_site/roblib_search_solr_site.info.yml b/modules/solr_site/roblib_search_solr_site.info.yml new file mode 100644 index 0000000..c6a97e3 --- /dev/null +++ b/modules/solr_site/roblib_search_solr_site.info.yml @@ -0,0 +1,8 @@ +name: Roblib Search Solr site +type: module +configure: roblib_search_solr_site.settings +description: Implements the Roblib Search for local Solr site bento results +package: Roblib Search +core_version_requirement: ^8.9 || ^9 +dependancies: + - roblib_search \ No newline at end of file diff --git a/modules/solr_site/roblib_search_solr_site.install b/modules/solr_site/roblib_search_solr_site.install deleted file mode 100755 index a4abe2d..0000000 --- a/modules/solr_site/roblib_search_solr_site.install +++ /dev/null @@ -1,2 +0,0 @@ - 'Roblib Solr Search Target configuration', - 'description' => 'Configuration for the Roblib Solr site search target', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('roblib_search_solr_site_config_form'), - 'access arguments' => array('access administration pages'), - 'type' => MENU_NORMAL_ITEM, - ); - - $items['roblib_search/solr_site/bestbet/%'] = array( - 'title' => 'BestBet', - 'page callback' => 'roblib_search_solr_site_bestbet', - 'page arguments' => array(3), - 'type' => MENU_CALLBACK, - 'access arguments' => array('search roblib solr_site'), - ); - - $items['roblib_search/solr_site/reserves/%'] = array( - 'title' => 'BestBet', - 'page callback' => 'roblib_search_solr_site_reserves', - 'page arguments' => array(3), - 'type' => MENU_CALLBACK, - 'access arguments' => array('search roblib solr_site'), - ); - $items['roblib_search/solr_site/databases/%'] = array( - 'title' => 'solr_site databases', - 'page callback' => 'roblib_search_solr_site_databases', - 'page arguments' => array(3), - 'type' => MENU_CALLBACK, - 'access arguments' => array('search roblib solr_site'), - ); - - $items['roblib_search/solr_site/guides/%'] = array( - 'title' => 'solr_site guides', - 'page callback' => 'roblib_search_solr_site_guides', - 'page arguments' => array(3), - 'type' => MENU_CALLBACK, - 'access arguments' => array('search roblib solr_site'), - ); - - $items['roblib_search/solr_site/results/%'] = array( - 'title' => 'solr_site guides', - 'page callback' => 'roblib_search_solr_site_results', - 'page arguments' => array(3), - 'type' => MENU_CALLBACK, - 'access arguments' => array('search roblib solr_site'), - ); - - - return $items; -} - -/** - * A form to manage the modules configuration. - * - * @param array $form - * A Drupal form array - * @param array $form_state - * A Drupal formstate array - * - * @return array - * A Drupal form array - */ -function roblib_search_solr_site_config_form($form, &$form_state) { - $form['roblib_search_solr_site_url'] = array( - '#type' => 'textfield', - '#title' => t('Solr url'), - '#default_value' => variable_get('roblib_search_solr_site_url', 'http://localhost:8983/solr'), - '#description' => t('The base Solr URL, for example http://localhost:8983/solr'), - '#required' => TRUE, - ); - $form['roblib_search_solr_site_num_results'] = array( - '#type' => 'textfield', - '#title' => t('Number of results to return'), - '#default_value' => variable_get('roblib_search_solr_site_num_results', '5'), - '#description' => t('The number of results to display in the Bento box'), - '#required' => TRUE, - ); - - return system_settings_form($form); -} - -/** - * Implements hook_permission(). - */ -function roblib_search_solr_site_permission() { - return array( - 'search roblib solr_site' => array( - 'title' => t('Search the solr_site target'), - 'description' => t('Search all Roblib solr_site target. This permission exposes the search blocks and allows you to see search results.'), - ), - 'administer roblib search_solr_site' => array( - 'title' => t('Administer Roblib Search Evergreen'), - 'description' => t('Administer settings for the Roblib solr_site search client.'), - ), - ); -} /** * Implements hook_theme(). */ -function roblib_search_solr_site_theme() { - // set path - $path = drupal_get_path('module', 'roblib_search_solr_site'); - $file = 'theme.inc'; - - return array( - // results page - 'roblib_search_solr_site' => array( - 'path' => $path . '/theme', - 'file' => $file, - 'template' => 'roblib-search-solr-site-results', - 'variables' => array('type' => NULL), - ), - ); +function roblib_search_solr_site_theme($existing, $type, $theme, $path) { + $modulePath = \Drupal::service('module_handler')->getModule('roblib_search') + ->getPath(); + $spinner_path = '/' . $modulePath . "/img/spinner.gif"; + return [ + 'roblib_search_solr_site' => [ + 'variables' => ['query' => NULL, 'spinner_path' => $spinner_path], + ], + ]; } -/** - * Implements hook_block_info(). - */ -function roblib_search_solr_site_block_info() { - - $blocks['roblib_search_solr_site_bestbet'] = array( - // info: The name of the block. - 'info' => t('Roblib Solr Search Best bets'), - // Block caching options (per role, per user, etc.) - 'cache' => DRUPAL_CACHE_PER_ROLE, // default - ); - - $blocks['roblib_search_solr_site_db'] = array( - // info: The name of the block. - 'info' => t('Roblib Solr Search Databases Block'), - // Block caching options (per role, per user, etc.) - 'cache' => DRUPAL_CACHE_PER_ROLE, // default - ); - - $blocks['roblib_search_solr_site_guides'] = array( - // info: The name of the block. - 'info' => t('Roblib Solr Search Guides Block'), - // Block caching options (per role, per user, etc.) - 'cache' => DRUPAL_CACHE_PER_ROLE, // default - ); - - $blocks['roblib_search_solr_site_results'] = array( - // info: The name of the block. - 'info' => t('Roblib Solr Search Results Block'), - // Block caching options (per role, per user, etc.) - 'cache' => DRUPAL_CACHE_PER_ROLE, // default - ); - - $blocks['roblib_search_solr_site_reserves'] = array( - // info: The name of the block. - 'info' => t('Roblib Solr Search Reserves Block'), - // Block caching options (per role, per user, etc.) - 'cache' => DRUPAL_CACHE_PER_ROLE, // default - ); - - return $blocks; -} - -/** - * Add a div around our block content so we can theme our panels. - * - * By adding our divs we can theme ours without affecting other drupal panels. - * - * @param array $variables - * Drupal variables array - * @param array $hook - */ -function roblib_search_solr_site_preprocess_panels_pane(&$variables, $hook) { - switch ($variables['pane']->subtype) { - case 'roblib_search_solr_site-roblib_search_solr_site_bestbet': - $variables['title_prefix'] = '
'; - $variables['title_suffix'] = '
'; - break; - - case 'roblib_search_solr_site-roblib_search_solr_site_db': - $variables['title_prefix'] = '
'; - $variables['title_suffix'] = '
'; - break; - - case 'roblib_search_solr_site-roblib_search_solr_site_guides': - $variables['title_prefix'] = '
'; - $variables['title_suffix'] = '
'; - break; - - case 'roblib_search_solr_site-roblib_search_solr_site_results': - $variables['title_prefix'] = '
'; - $variables['title_suffix'] = '
'; - break; - - case 'roblib_search_solr_site-roblib_search_solr_site_reserves': - $variables['title_prefix'] = '
'; - $variables['title_suffix'] = '
'; - break; - } -} - -/** - * Implements hook_block_view(). - */ -function roblib_search_solr_site_block_view($delta = '') { - switch ($delta) { - case 'roblib_search_solr_site_bestbet': - $block['subject'] = t('Best Bets'); - $block['content'] = theme('roblib_search_solr_site', array('type' => 'bestbet')); - break; - - case 'roblib_search_solr_site_db': - $block['subject'] = t('Databases'); - $block['content'] = theme('roblib_search_solr_site', array('type' => 'databases')); - break; - - case 'roblib_search_solr_site_guides': - $block['subject'] = t('Guides'); - $block['content'] = theme('roblib_search_solr_site', array('type' => 'guides')); - break; - - case 'roblib_search_solr_site_results': - $block['subject'] = t('Library Site'); - $block['content'] = theme('roblib_search_solr_site', array('type' => 'results')); - break; - - case 'roblib_search_solr_site_reserves': - $block['subject'] = t('Reserves'); - $block['content'] = theme('roblib_search_solr_site', array('type' => 'reserves')); - break; - } - return $block; -} /** * Send the query to solr but limit the results so it doesn't include certain content. @@ -252,10 +30,10 @@ function roblib_search_solr_site_block_view($delta = '') { * @param string $query * The solr search string. */ -function roblib_search_solr_site_results($query) { +/*function roblib_search_solr_site_results($query) { print roblib_search_solr_site_get_results($query, '-bundle:bestbet'); exit(); -} +}*/ /** * Send the query to solr but limit the results so it only includes content of type bestbet. @@ -265,54 +43,14 @@ function roblib_search_solr_site_results($query) { * @param string $query * The solr search string. */ -function roblib_search_solr_site_bestbet($query) { +/*function roblib_search_solr_site_bestbet($query) { $query = str_replace('"', '', $query); $json = roblib_search_solr_site_get_results("sort_label:$query", 'bundle:bestbet'); $json = roblib_search_solr_site_add_url($json); print $json; exit(); -} +}*/ -/** - * Send the query to solr but limit the results so it only includes content of type database. - * - * Print json and exit so the javascript can consume the json. - * - * @param string $query - * The solr search string. - */ -function roblib_search_solr_site_databases($query) { - print roblib_search_solr_site_get_results($query, 'bundle:database'); - exit(); -} - -/** - * Send the query to solr but limit the results so it only includes content of type database. - * - * Print json and exit so the javascript can consume the json. - * - * @param string $query - * The solr search string. - */ -function roblib_search_solr_site_reserves($query) { - print roblib_search_solr_site_get_results($query, 'bundle:course_reserve'); - exit(); -} - -/** - * Send the query to solr but limit the results so it only includes content of tagged with the guide keyword. - * - * Print json and exit so the javascript can consume the json. - * - * @param string $query - * The solr search string. - */ -function roblib_search_solr_site_guides($query) { - // TODO make the field and value searched configurable instead of hardcoded. - // sm_vid_SearchKeywords:guides is another field we might use. - print roblib_search_solr_site_get_results($query, 'im_field_keywords:627'); - exit(); -} /** @@ -327,7 +65,7 @@ function roblib_search_solr_site_guides($query) { * @return string * json we got from solr with an updated url directly to the target of the link field */ -function roblib_search_solr_site_add_url($json) { +/*function roblib_search_solr_site_add_url($json) { $responses = json_decode($json); foreach ($responses->response->docs as &$doc) { $nid = $doc->entity_id; @@ -341,31 +79,7 @@ function roblib_search_solr_site_add_url($json) { } return json_encode($responses); } - -/** - * Sends a query to Solr. - * - * @param string $query_string - * A string to search for - * @param string $type - * A string to filter the query against field:value - * - * @return string - * Solr results as json. - */ -function roblib_search_solr_site_get_results($query_string = NULL, $type) { - $num_results = variable_get('roblib_search_solr_site_num_results', '5'); - $query = apachesolr_drupal_query("apachesolr"); - $encoded_query = htmlentities($query_string, ENT_QUOTES); - $query->addParam('q', $encoded_query); // keyword to be searched - $query->addParam('rows', $num_results); - $query->addParam('fq', $type); - $query->addParam('mm', '1'); - apachesolr_search_add_boost_params($query); - $response = $query->search(); - $json_results = drupal_json_encode($response); - return $json_results; -} +*/ /** @@ -376,7 +90,7 @@ function roblib_search_solr_site_help($path, $arg) { case 'admin/help#roblib_search_solr_site': return t( '

-provides a target for the Roblib search module +provides a Solr target for the Roblib search module

' ); } diff --git a/modules/solr_site/roblib_search_solr_site.routing.yml b/modules/solr_site/roblib_search_solr_site.routing.yml new file mode 100644 index 0000000..535d4f2 --- /dev/null +++ b/modules/solr_site/roblib_search_solr_site.routing.yml @@ -0,0 +1,24 @@ +roblib_search_solr_site.settings: + path: '/admin/config/system/roblib_search_solr_site_settings' + defaults: + _form: '\Drupal\roblib_search_solr_site\Form\SolrsiteSettingsForm' + _title: 'Roblib Search Solr Site Settings Form' + requirements: + _permission: 'administer site configuration' +roblib_search_solr_site.bestbet_search: + path: '/roblib_search/solr_site/bestbet/{query}' + defaults: + _controller: '\Drupal\roblib_search_solr_site\Controller\RoblibSearchSolrsiteController::bestbetResults' + _title: 'Roblib Search Bestbet' + query: '[a-zA-Z\s]+' + requirements: + _permission: 'access content' + +roblib_search_solr_site.general_search: + path: '/roblib_search/solr_site/general/{query}' + defaults: + _controller: '\Drupal\roblib_search_solr_site\Controller\RoblibSearchSolrsiteController::generalResults' + _title: 'Roblib Search Solr Site Search' + query: '[a-zA-Z\s]+' + requirements: + _permission: 'access content' \ No newline at end of file diff --git a/modules/solr_site/src/Controller/RoblibSearchSolrsiteController.php b/modules/solr_site/src/Controller/RoblibSearchSolrsiteController.php new file mode 100644 index 0000000..374af57 --- /dev/null +++ b/modules/solr_site/src/Controller/RoblibSearchSolrsiteController.php @@ -0,0 +1,70 @@ +getResults($query, 'BestBet'); + exit(); + } + + /** + * Print JSON. + * + */ + public function generalResults($query = NULL) { + print $this->getResults($query, 'General'); + exit(); + } + + /** + * Query Solr for site results. + * @param string $query + * The search term(s) to send to Solr. + * @param string type + * The type of search, either BestBet or General. + * @return string + * A JSON string + */ + function getResults($query = NULL, $type = 'General') { + global $base_url; + $config = \Drupal::config('roblib_search_solr_site.settings'); + // Url parameters. + if (!isset($query)) { + if (isset($_GET['roblib_query'])) { + $query = $_GET['roblib_query']; + } + else { + return ''; + } + } + $query = urlencode($query); + + + /* $num_results = variable_get('roblib_search_solr_site_num_results', '5'); + $query = apachesolr_drupal_query("apachesolr"); + $encoded_query = htmlentities($query_string, ENT_QUOTES); + $query->addParam('q', $encoded_query); // keyword to be searched + $query->addParam('rows', $num_results); + $query->addParam('fq', $type); + $query->addParam('mm', '1'); + apachesolr_search_add_boost_params($query); + $response = $query->search(); + $json_results = drupal_json_encode($response); + return $json_results;*/ + + + $search_url = $base_url . '/roblib_search/solr_site/' . $type . '/' . $query; + return json_encode($query); + } +} diff --git a/modules/solr_site/src/Form/SolrsiteSettingsForm.php b/modules/solr_site/src/Form/SolrsiteSettingsForm.php new file mode 100644 index 0000000..46e3ab8 --- /dev/null +++ b/modules/solr_site/src/Form/SolrsiteSettingsForm.php @@ -0,0 +1,85 @@ + 'textfield', + '#title' => t('Solr url'), + '#default_value' => variable_get('roblib_search_solr_site_url', 'http://localhost:8983/solr'), + '#description' => t('The base Solr URL, for example http://localhost:8983/solr'), + '#required' => TRUE, + ); + $form['roblib_search_solr_site_num_results'] = array( + '#type' => 'textfield', + '#title' => t('Number of results to return'), + '#default_value' => variable_get('roblib_search_solr_site_num_results', '5'), + '#description' => t('The number of results to display in the Bento box'), + '#required' => TRUE, + ); + + return system_settings_form($form); + */ + $form['solr_site_url'] = array( + '#type' => 'textfield', + '#title' => t('Solr URL'), + '#default_value' => $config->get('solr_site_url'), + '#description' => t('The base Solr URL, for example http://localhost:8983/solr'), + '#required' => TRUE, + ); + + $form['solr_site_num_results'] = array( + '#type' => 'textfield', + '#title' => t('Number of results to return'), + '#default_value' => $config->get('solr_site_num_results'), + '#description' => t('The number of results to display in the Bento box'), + '#required' => TRUE, + ); + $form['actions']['submit'] = [ + '#type' => 'submit', + '#value' => t('Save'), + '#button_type' => 'primary', + ]; + return $form; + } + + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, FormStateInterface $form_state) { + + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + $config = \Drupal::configFactory()->getEditable('roblib_search_eds.settings'); + $config->set('solr_site_url', $form_state->getValue('solr_site_url'))->save(); + $config->set('solr_site_num_results', $form_state->getValue('solr_site_num_results'))->save(); + } + +} diff --git a/modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteBestbet.php b/modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteBestbet.php new file mode 100644 index 0000000..030932a --- /dev/null +++ b/modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteBestbet.php @@ -0,0 +1,39 @@ +getSchemeAndHttpHost(); + $search_url = \Drupal::config('roblib_search_solr_site.settings') + ->get('solr_site_url'); + $settings = [ + 'solr_site_search_url' => $search_url, + ]; + return [ + '#theme' => 'roblib_search_solr_site', + 'query' => $query, + '#attached' => [ + 'library' => [ + 'roblib_search_solr_site/solr_site' + ], + 'drupalSettings' => $settings, + ], + ]; + } +} diff --git a/modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteGeneral.php b/modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteGeneral.php new file mode 100644 index 0000000..79e1f01 --- /dev/null +++ b/modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteGeneral.php @@ -0,0 +1,40 @@ +getSchemeAndHttpHost(); + $search_url = \Drupal::config('roblib_search_solr_site.settings') + ->get('solr_site_url'); + $settings = [ + 'solr_site_search_url' => $search_url, + ]; + return [ + '#theme' => 'roblib_search_solr_site', + 'query' => $query, + '#attached' => [ + 'library' => [ + 'roblib_search_solr_site/solr_site' + ], + 'drupalSettings' => $settings, + ], + ]; + } + +} diff --git a/modules/solr_site/theme/roblib-search-solr-site-results.tpl.php b/modules/solr_site/templates/roblib-search-solr-site-results.html.twig similarity index 100% rename from modules/solr_site/theme/roblib-search-solr-site-results.tpl.php rename to modules/solr_site/templates/roblib-search-solr-site-results.html.twig diff --git a/modules/solr_site/theme/theme.inc b/modules/solr_site/templates/theme.inc similarity index 100% rename from modules/solr_site/theme/theme.inc rename to modules/solr_site/templates/theme.inc diff --git a/roblib_search.module b/roblib_search.module index 80e5794..90ac1cc 100644 --- a/roblib_search.module +++ b/roblib_search.module @@ -13,6 +13,9 @@ function roblib_search_theme($existing, $type, $theme, $path) { 'roblib_search_results' => [ 'variables' => ['query' => NULL], ], + 'roblib_search_other_sources' => [ + 'variables' => ['query' => NULL], + ], ]; } diff --git a/src/Plugin/Block/RoblibSearchOtherSourcesBlock.php b/src/Plugin/Block/RoblibSearchOtherSourcesBlock.php new file mode 100644 index 0000000..3b662e3 --- /dev/null +++ b/src/Plugin/Block/RoblibSearchOtherSourcesBlock.php @@ -0,0 +1,34 @@ + 'roblib_search_other_sources', + '#query' => $query, + ]; + } + +} diff --git a/theme/roblib-search-other-sources.tpl.php b/templates/roblib-search-other-sources.html.twig similarity index 52% rename from theme/roblib-search-other-sources.tpl.php rename to templates/roblib-search-other-sources.html.twig index 41edc07..14a683d 100644 --- a/theme/roblib-search-other-sources.tpl.php +++ b/templates/roblib-search-other-sources.html.twig @@ -1,21 +1,11 @@ - -
\ No newline at end of file diff --git a/theme/theme.inc b/theme/theme.inc index c6f45aa..a8fbb82 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -5,7 +5,7 @@ * and open the template in the editor. */ -function roblib_search_preprocess_roblib_search_other_sources(&$variables) { +/*function roblib_search_preprocess_roblib_search_other_sources(&$variables) { global $base_url; if (!isset($query)) { if (isset($_GET['roblib_query'])) { @@ -16,5 +16,5 @@ function roblib_search_preprocess_roblib_search_other_sources(&$variables) { } } $variables['query'] = urlencode($query); -} +}*/ ?>