From cde498344dcb2739bd703b53bdbcdf728d5b5f0a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 27 Jul 2020 19:16:07 +0000 Subject: [PATCH] Bug 26070: Remove GoogleIndicTransliteration system preference The Google Transliterate API was deprecated on May 26, 2011. This patch removes the feature and associated system preference. To test, apply the patch and run the database update process. - Go to Administration -> System preferences and search for 'GoogleIndicTransliteration.' There should be no results. - Search the Koha codebase for references to 'GoogleIndicTransliteration.' There should be no current references.. Signed-off-by: Amit Gupta Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit 9b9e8fd32852acceb10cfc54d4a5a3acc0f6e232) Signed-off-by: Lucas Gass --- ...g-26070-remove-google-transliteration.perl | 8 ++++++ installer/data/mysql/sysprefs.sql | 1 - .../en/modules/admin/preferences/opac.pref | 7 ----- .../bootstrap/en/includes/opac-bottom.inc | 4 --- .../js/googleindictransliteration.js | 27 ------------------- opac/opac-main.pl | 5 ---- opac/opac-search.pl | 5 ---- 7 files changed, 8 insertions(+), 49 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug-26070-remove-google-transliteration.perl delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/googleindictransliteration.js diff --git a/installer/data/mysql/atomicupdate/bug-26070-remove-google-transliteration.perl b/installer/data/mysql/atomicupdate/bug-26070-remove-google-transliteration.perl new file mode 100644 index 0000000000..13a57e7686 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug-26070-remove-google-transliteration.perl @@ -0,0 +1,8 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # Remove from the systempreferences table + $dbh->do("DELETE FROM systempreferences WHERE variable = 'GoogleIndicTransliteration'"); + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 26070, "Remove references to deprecated Google Transliterate API"); +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 9c0d0bf394..ccb6ffcba4 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -206,7 +206,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'), ('GDPR_Policy','','Enforced|Permissive|Disabled','General Data Protection Regulation - policy', 'Choice'), ('gist','0','','Default Goods and Services tax rate NOT in %, but in numeric form (0.12 for 12%), set to 0 to disable GST','Integer'), -('GoogleIndicTransliteration','0','','GoogleIndicTransliteration on the OPAC.','YesNo'), ('GoogleJackets','0',NULL,'if ON, displays jacket covers from Google Books API','YesNo'), ('GoogleOpenIDConnect', '0', NULL, 'if ON, allows the use of Google OpenID Connect for login', 'YesNo'), ('GoogleOAuth2ClientID', '', NULL, 'Client ID for the web app registered with Google', 'Free'), 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 dc213bd9af..26e50bb7f9 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 @@ -196,13 +196,6 @@ OPAC: yes: Show no: "Don't show" - a link to recent comments in the OPAC masthead. - - - - pref: GoogleIndicTransliteration - default: 0 - choices: - yes: Show - no: "Don't show" - - GoogleIndicTransliteration on the OPAC. - - pref: OpacHighlightedWords choices: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index a6f6709341..d4d8b23bb0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -261,10 +261,6 @@ $.widget.bridge('uitooltip', $.ui.tooltip); //]]> [% END %] -[% IF ( GoogleIndicTransliteration ) %] - - [% Asset.js("js/googleindictransliteration.js") | $raw %] -[% END %] [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]