From 3708396e8491949145b6823d72a067b0e543a1b3 Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Fri, 10 Nov 2023 19:48:21 +0000 Subject: [PATCH] Bug 33317: Using checkoxes in OpacMetaRobots preference system to prevent incorrect data entry Signed-off-by: Owen Leonard Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer --- installer/data/mysql/atomicupdate/bug_33317.pl | 2 +- installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_33317.pl b/installer/data/mysql/atomicupdate/bug_33317.pl index edffff480d..58858e4e27 100644 --- a/installer/data/mysql/atomicupdate/bug_33317.pl +++ b/installer/data/mysql/atomicupdate/bug_33317.pl @@ -7,7 +7,7 @@ return { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('OpacMetaRobots','','','Improve search engine crawling.', 'Textarea') }); + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('OpacMetaRobots','','','Improve search engine crawling.', 'Multiple') }); say $out "Added system preference 'OpacMetaRobots'"; }, diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 587b7e32f3..164a26f040 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -509,7 +509,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OPACMandatoryHoldDates', '', '|start|end|both', 'Define which hold dates are required on OPAC reserve form', 'Choice'), ('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'), ('OpacMetaDescription','','','This description will show in search engine results (160 characters).','Textarea'), -('OpacMetaRobots','','','Improve search engine crawling.','Textarea'), +('OpacMetaRobots', 'noindex,nofollow', NULL, 'Improve search engine crawling.', 'Multiple'), ('OPACMySummaryHTML','','70|10','Enter the HTML that will appear in a column on the \'my summary\' and \'my checkout history\' tabs when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','Textarea'), ('OpacNewsLibrarySelect','0','','Show selector for branches on OPAC news page','YesNo'), ('OpacNoItemTypeImages','0',NULL,'If ON, disables itemtype images in the OPAC','YesNo'), 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 3dd91612ec..e667d9aa05 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 @@ -63,7 +63,9 @@ OPAC: - - "Improve search engine crawling." - pref: OpacMetaRobots - type: textarea + multiple: + noindex: "noindex" + nofollow: "nofollow" - - By default, show bibliographic records - pref: BiblioDefaultView -- 2.39.5