From 0e191a7e3f1fd33edb056e39788dd053bbb0c804 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 --- 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 7eee94579c..228e4e6ef9 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -493,7 +493,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'), ('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 9e5213cd1d..dc8774759a 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.34.1