From b55f12d3385d0b7133a18521c27f9581ae3700e8 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Wed, 19 Dec 2018 09:29:55 -0500 Subject: [PATCH] Simplify alphabrowse linking. (#1294) - Old ID-based method was based on lack of confidence and added unnecessary complexity. - Removing dependency on IDs will allow future simplification of the browse handler. --- .../VuFind/View/Helper/Root/AlphaBrowse.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/module/VuFind/src/VuFind/View/Helper/Root/AlphaBrowse.php b/module/VuFind/src/VuFind/View/Helper/Root/AlphaBrowse.php index e13fdbd6ffa..f3e96089808 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/AlphaBrowse.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/AlphaBrowse.php @@ -71,19 +71,12 @@ class AlphaBrowse extends \Zend\View\Helper\AbstractHelper return null; } - // Linking using bib ids is generally more reliable than doing searches for - // headings, but headings give shorter queries and don't look as strange. - if ($item['count'] < 5) { - $safeIds = array_map([$this, 'escapeForSolr'], $item['ids']); - $query = ['type' => 'ids', 'lookfor' => implode(' ', $safeIds)]; - if ($item['count'] == 1) { - $query['jumpto'] = 1; - } - } else { - $query = [ - 'type' => ucwords($source) . 'Browse', - 'lookfor' => $this->escapeForSolr($item['heading']), - ]; + $query = [ + 'type' => ucwords($source) . 'Browse', + 'lookfor' => $this->escapeForSolr($item['heading']), + ]; + if ($item['count'] == 1) { + $query['jumpto'] = 1; } return $this->url->__invoke('search-results', [], ['query' => $query]); } -- GitLab