From ec70b79120a06efaaaf8386dd124ef4056a9a17e 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 --- ...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 00000000000..750bfab5f59 --- /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 259d7f05f1a..9c8bad32d28 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -615,6 +615,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 0aa70db7087..0997740dc0c 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.30.2