Bugzilla – Attachment 39847 Details for
Bug 14318
iDreamBooks doesn't work when Koha is using https
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14318 - iDreamBooks doesn't work when Koha is using https
Bug-14318---iDreamBooks-doesnt-work-when-Koha-is-u.patch (text/plain), 6.49 KB, created by
Kyle M Hall (khall)
on 2015-06-04 11:14:19 UTC
(
hide
)
Description:
Bug 14318 - iDreamBooks doesn't work when Koha is using https
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-06-04 11:14:19 UTC
Size:
6.49 KB
patch
obsolete
>From 8bfa98586c7f941f7dcdd5ae04a5d5732b62058c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 4 Jun 2015 07:13:01 -0400 >Subject: [PATCH] Bug 14318 - iDreamBooks doesn't work when Koha is using https > >If a Koha server is configured to run over SSL, all iDreamBooks content >is blocked due to the fact that a secure page is requesting an insecure >endpoint. This is due to the fact that the urls for iDreamBooks use http >and not https. A simple fix would be to switch them to https since >browsers have to qualms about loading a secure data endpoint from an >insecure one. > >Test Plan: >1) Enable iDreamBooks >2) Set up your OPAC to use https >3) Verify iDreamBooks content continues to work >--- > .../admin/preferences/enhanced_content.pref | 6 +++--- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 6 +++--- > .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 ++-- > 3 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >index 3002546..1e68153 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >@@ -147,19 +147,19 @@ Enhanced Content: > choices: > yes: Add > no: "Don't add" >- - a tab on the OPAC details with book reviews from critics aggregated by <a href='http://idreambooks.com/'>IDreamBooks.com</a>. >+ - a tab on the OPAC details with book reviews from critics aggregated by <a href='https://idreambooks.com/'>IDreamBooks.com</a>. > - > - pref: IDreamBooksReadometer > choices: > yes: Add > no: "Don't add" >- - a "Readometer" that summarizes the reviews gathered by <a href='http://idreambooks.com/'>IDreamBooks.com</a> to the OPAC details page. >+ - a "Readometer" that summarizes the reviews gathered by <a href='https://idreambooks.com/'>IDreamBooks.com</a> to the OPAC details page. > - > - pref: IDreamBooksResults > choices: > yes: Add > no: "Don't add" >- - the rating from <a href='http://idreambooks.com/'>IDreamBooks.com</a> to OPAC search results. >+ - the rating from <a href='https://idreambooks.com/'>IDreamBooks.com</a> to OPAC search results. > OCLC: > - > - pref: XISBN >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index f0310d5..69c921f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1612,7 +1612,7 @@ > if ($.browser.msie && parseInt($.browser.version, 10) >= 8 && window.XDomainRequest) { > // Use Microsoft XDR for IE version 8 or above > var xdr = new XDomainRequest(); >- xdr.open("get", "http://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e"); >+ xdr.open("get", "https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e"); > xdr.onload = function() { > json = 'json = '+xdr.responseText; // the string now looks like.. json = { ... }; > eval(json); // json is now a regular JSON object >@@ -1620,7 +1620,7 @@ > } > xdr.send(); > } else { >- $.getJSON("http://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){ >+ $.getJSON("https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){ > parseIDBJSON(json); > }); > } >@@ -1635,7 +1635,7 @@ > isbn = isbn.replace(/-/, ''); > > [% IF ( IDreamBooksReadometer ) %] >- $(".title").append('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="http://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+' by '+json.book.author+'" title="Rating based on reviews of '+json.book.title+'"></a>'); >+ $(".title").append('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="https://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+' by '+json.book.author+'" title="Rating based on reviews of '+json.book.title+'"></a>'); > [% END %] > > [% IF ( IDreamBooksReviews ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index 27c5a10..d905f13 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -711,7 +711,7 @@ $(document).ready(function(){ > if ($.browser.msie && parseInt($.browser.version, 10) >= 8 && window.XDomainRequest) { > // Use Microsoft XDR for IE version 8 or above > var xdr = new XDomainRequest(); >- xdr.open("get", "http://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e"); >+ xdr.open("get", "https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e"); > xdr.onload = function() { > json = 'json = '+xdr.responseText; // the string now looks like.. json = { ... }; > eval(json); // json is now a regular JSON object >@@ -724,7 +724,7 @@ $(document).ready(function(){ > } > xdr.send(); > } else { >- $.getJSON("http://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){ >+ $.getJSON("https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){ > if(json.total_results > 0 && json.book.rating > 0){ > $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+" by "+json.book.author+"' title='Rating based on reviews of "+json.book.title+"'>"+json.book.rating+"%"); > $(element).show(); >-- >1.7.2.5
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 14318
:
39847
|
39912
|
39946