From: miker Date: Wed, 30 Apr 2008 12:30:08 +0000 (+0000) Subject: bz#618, stop duplicate authority cross-ref suggestions X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bc487934a77260e134a77cbd252c00cb6d3bbd80;p=Evergreen.git bz#618, stop duplicate authority cross-ref suggestions git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@9493 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/skin/default/js/result_common.js b/Open-ILS/web/opac/skin/default/js/result_common.js index 2229c48f08..98fb7252b3 100644 --- a/Open-ILS/web/opac/skin/default/js/result_common.js +++ b/Open-ILS/web/opac/skin/default/js/result_common.js @@ -200,6 +200,7 @@ function resultLowHits() { if(getTerm()) resultExpandSearch(); /* advanced search */ } +var lowHitsXRefSet = {}; var lowHitsXRefLink; var lowHitsXRefLinkParent; function resultLowHitXRef(r) { @@ -215,6 +216,10 @@ function resultLowHitXRef(r) { var word; var c = 0; while( word = arr.shift() ) { + + if (lowHitsXRefSet[word] == 1) continue; + lowHitsXRefSet[word] = 1; + if(c++ > 20) break; var a = {}; a[PARAM_TERM] = word;