From d17da188ab42ffac62aa351827a6c4135a456079 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 11 Mar 2014 09:05:51 +0000 Subject: [PATCH] Bug 6149 - RM followup. Gloabal replaced HightedStopWords syspref with NotHightedWords for clarification purposes. Hopefully this is a bit better and still not too verbose. --- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index aee42e9..b3cc947 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -229,7 +229,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('opacheader','','70|10','Add HTML to be included as a custom header in the OPAC','Textarea'), ('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'), ('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'), -('HighlightedStopWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'), +('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'), ('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'), ('OPACItemHolds','1','','Allow OPAC users to place hold on specific items. If OFF, users can only request next available copy.','YesNo'), ('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e1c3d25..62e8e07 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8039,7 +8039,7 @@ if(CheckVersion($DBversion)) { $DBversion = "3.15.00.XXX"; if ( CheckVersion($DBversion) ) { - $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('HighlightedStopWords','and|or|not',NULL,'List of words to NOT highlight when OpacHighlightedWords is enabled','free')" + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHighlightedWords is enabled','free')" ); print "Upgrade to $DBversion done (Bug 6149: Operator highlighted in search results)\n"; SetVersion($DBversion); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 0b46a86..af732b7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -136,7 +136,7 @@ OPAC: yes: Highlight no: "Don't highlight" - words the patron searched for in their search results and detail pages; To prevent certain words from ever being highlighted, enter a list of stopwords here - - pref: HighlightedStopWords + - pref: NotHighlightedWords class: multi - (separate columns with |) - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index b91d7c6..79da90c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -163,7 +163,7 @@ function highlightOn() { var x; for (x in q_array) { q_array[x] = q_array[x].toLowerCase(); - var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); + var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { toHighlight.highlight(q_array[x]); } diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt index e61c879..191631e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt @@ -351,7 +351,7 @@ function highlightOn() { for (x in q_array) { q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); q_array[x] = q_array[x].toLowerCase(); - var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); + var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { $("td").highlight(q_array[x]); } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index de07b4f..1d0b813 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -65,7 +65,7 @@ for (x in q_array) { q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); q_array[x] = q_array[x].toLowerCase(); - var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); + var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); if( $.inArray(q_array[x], myStopwords) == -1 ) { $(".title").highlight(q_array[x]); $(".author").highlight(q_array[x]); diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt index 8ceec20..0f6f6f0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt @@ -85,7 +85,7 @@ function highlightOn() { for (x in q_array) { q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); q_array[x] = q_array[x].toLowerCase(); - var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); + var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { $("td").highlight(q_array[x]); } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index fbe7bbe..c6e499c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -101,7 +101,7 @@ function highlightOn() { for (x in q_array) { q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); q_array[x] = q_array[x].toLowerCase(); - var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); + var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { $(".title").highlight(q_array[x]); $(".author").highlight(q_array[x]); -- 1.7.10.4