Bugzilla – Attachment 107446 Details for
Bug 26070
Google Transliterate API has been deprecated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26070: Remove GoogleIndicTransliteration system preference
Bug-26070-Remove-GoogleIndicTransliteration-system.patch (text/plain), 6.97 KB, created by
Owen Leonard
on 2020-07-27 19:26:03 UTC
(
hide
)
Description:
Bug 26070: Remove GoogleIndicTransliteration system preference
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-07-27 19:26:03 UTC
Size:
6.97 KB
patch
obsolete
>From 3a7f3f2417876272179a941dbfe63a4f598998b7 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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); > //]]> > </script> > [% END %] >-[% IF ( GoogleIndicTransliteration ) %] >- <script src="https://www.google.com/jsapi"></script> >- [% Asset.js("js/googleindictransliteration.js") | $raw %] >-[% END %] > > [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %] > <script> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/googleindictransliteration.js b/koha-tmpl/opac-tmpl/bootstrap/js/googleindictransliteration.js >deleted file mode 100644 >index 027ad61d5b..0000000000 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/googleindictransliteration.js >+++ /dev/null >@@ -1,27 +0,0 @@ >- // Load the Google Transliteration API >- google.load("elements", "1", { >- packages: "transliteration" >- }); >- >- function onLoad() { >- var options = { >- sourceLanguage: 'en', >- destinationLanguage: ['hi','kn','ml','ta','te'], >- shortcutKey: 'ctrl+g', >- transliterationEnabled: false >- }; >- >- // Create an instance on TransliterationControl with the required >- // options. >- var control = >- new google.elements.transliteration.TransliterationControl(options); >- >- // Enable transliteration in the textfields with the given ids. >- var ids = [ "translControl1" ]; >- control.makeTransliteratable(ids); >- >- // Show the transliteration control which can be used to toggle between >- // English and Hindi and also choose other destination language. >- control.showControl('translControl'); >- } >- google.setOnLoadCallback(onLoad); >diff --git a/opac/opac-main.pl b/opac/opac-main.pl >index de5ad8e945..78b8d74fe7 100755 >--- a/opac/opac-main.pl >+++ b/opac/opac-main.pl >@@ -105,9 +105,4 @@ $template->param( > daily_quote => $quote, > ); > >-# If GoogleIndicTransliteration system preference is On Set parameter to load Google's javascript in OPAC search screens >-if (C4::Context->preference('GoogleIndicTransliteration')) { >- $template->param('GoogleIndicTransliteration' => 1); >-} >- > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 2f2043e77c..b26de86663 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -1012,11 +1012,6 @@ $template->param( > > my $content_type = ($format eq 'rss' or $format eq 'atom' or $format eq 'opensearchdescription') ? $format : 'html'; > >-# If GoogleIndicTransliteration system preference is On Set parameter to load Google's javascript in OPAC search screens >-if (C4::Context->preference('GoogleIndicTransliteration')) { >- $template->param('GoogleIndicTransliteration' => 1); >-} >- > $template->{VARS}->{DidYouMean} = > ( defined C4::Context->preference('OPACdidyoumean') > && C4::Context->preference('OPACdidyoumean') =~ m/enable/ ); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26070
:
107410
|
107446
|
107470
|
107553