From 3a7f3f2417876272179a941dbfe63a4f598998b7 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.. --- .../bug-26070-remove-google-transliteration.perl | 8 +++++++ installer/data/mysql/sysprefs.sql | 1 - .../prog/en/modules/admin/preferences/opac.pref | 7 ------ .../bootstrap/en/includes/opac-bottom.inc | 4 ---- .../bootstrap/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 dbb13938ae..75f3608000 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 6f6e5499ef..edc6ec4809 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 @@ -197,13 +197,6 @@ OPAC: 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: yes: Highlight 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 9c4649ea88..9bcc4894a8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -274,10 +274,6 @@ $.widget.bridge('uitooltip', $.ui.tooltip); //]]> [% END %] -[% IF ( GoogleIndicTransliteration ) %] - - [% Asset.js("js/googleindictransliteration.js") | $raw %] -[% END %] [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]