From b789571ff57630818ee977212b5bcca0246777f1 Mon Sep 17 00:00:00 2001 From: Slava Shishkin Date: Sun, 24 Apr 2022 00:18:22 +0300 Subject: [PATCH] Bug 23919: Add new system preference SearchWithISSNVariations Signed-off-by: David Nind Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- ...69_-_add_SSearchWithISSNVariations_syspref.pl | 16 ++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/searching.pref | 7 +++++++ 3 files changed, 24 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_28269_-_add_SSearchWithISSNVariations_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_28269_-_add_SSearchWithISSNVariations_syspref.pl b/installer/data/mysql/atomicupdate/bug_28269_-_add_SSearchWithISSNVariations_syspref.pl new file mode 100755 index 0000000000..750bfab5f5 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_28269_-_add_SSearchWithISSNVariations_syspref.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "28269", + description => "Add new system preference SearchWithISSNVariations", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do( q{ + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) + VALUES ('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo') + + }); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 4c5abd6f61..6a161abe72 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -618,6 +618,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SearchLimitLibrary', 'homebranch', 'homebranch|holdingbranch|both', "When limiting search results with a library or library group, use the item's home library, or holding library, or both.", 'Choice'), ('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'), ('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'), +('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'), ('SelfCheckAllowByIPRanges','',NULL,'(Leave blank if not used. Use ranges or simple ip addresses separated by spaces, like 192.168.1.1 192.168.0.0/24.)','Short'), ('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'), ('SelfCheckInMainUserBlock','','70|10','Add a block of HTML that will display on the self check-in screen.','Textarea'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index 0aa70db708..0997740dc0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -269,6 +269,13 @@ Searching: 1: "search" 0: "don't search" - on all variations of the ISBN. + - + - When searching on the ISSN index, + - pref: SearchWithISSNVariations + choices: + 1: "search" + 0: "don't search" + - on all variations of the ISSN. - - pref: BiblioItemtypeInfo choices: -- 2.39.5