Skip to content
Snippets Groups Projects
Commit b3c05b99 authored by Demian Katz's avatar Demian Katz Committed by Robert Lange
Browse files

Fix problems with EDS internal links. (#1873)

- Include quotes in search terms to improve accuracy
- Ensure correct URL encoding
- Add subject to list of search types
parent 693b96e5
Branches
Tags
No related merge requests found
...@@ -199,6 +199,7 @@ translated_facets[] = SourceType ...@@ -199,6 +199,7 @@ translated_facets[] = SourceType
AllFields = "All Fields" AllFields = "All Fields"
TI = Title TI = Title
AU = Author AU = Author
SU = Subject
; This section defines which search options will be included on the advanced ; This section defines which search options will be included on the advanced
; search screen. All the notes above [Basic_Searches] also apply here. ; search screen. All the notes above [Basic_Searches] also apply here.
......
...@@ -579,9 +579,9 @@ class EDS extends DefaultRecord ...@@ -579,9 +579,9 @@ class EDS extends DefaultRecord
if (in_array($group, $allowed_searchlink_groups)) { if (in_array($group, $allowed_searchlink_groups)) {
$type = strtoupper($group); $type = strtoupper($group);
$link_xml = '/<searchLink fieldCode="([^\"]*)" ' $link_xml = '/<searchLink fieldCode="([^\"]*)" '
. 'term="%22([^\"]*)%22">/'; . 'term="(%22[^\"]*%22)">/';
$link_html $link_html = '<a href="../EDS/Search?lookfor=$2&amp;type='
= "<a href=\"../EDS/Search?lookfor=$2&amp;type={$type}\">"; . urlencode($type) . '">';
$data = preg_replace($link_xml, $link_html, $data); $data = preg_replace($link_xml, $link_html, $data);
$data = str_replace('</searchLink>', '</a>', $data); $data = str_replace('</searchLink>', '</a>', $data);
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment