From 8d5fb2c614808da961d84b0268415226b0532f38 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 (cherry picked from commit cde498344dcb2739bd703b53bdbcdf728d5b5f0a) Signed-off-by: Aleisha Amohia --- ...g-26070-remove-google-transliteration.perl | 9 +++++++ 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, 9 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..c1ef23e13e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug-26070-remove-google-transliteration.perl @@ -0,0 +1,9 @@ +$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) + print "Upgrade to $DBversion done (Bug 26070 - Remove references to deprecated Google Transliterate API)\n"; + SetVersion( $DBversion ); +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index be1f8e1bb3..eecdd70362 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -199,7 +199,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 e41dd55d84..bcd8cf2fd2 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 @@ -189,13 +189,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 c771f3b549..db77f085e7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -258,10 +258,6 @@ $.widget.bridge('uitooltip', $.ui.tooltip); //]]> [% END %] -[% IF ( GoogleIndicTransliteration ) %] - - [% Asset.js("js/googleindictransliteration.js") | $raw %] -[% END %] [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]