Bugzilla – Attachment 26885 Details for
Bug 11978
OverDrive API now prepends http:// to URLs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11978 - Fix URLs displayed in OverDrive search
PASSED-QA-Bug-11978---Fix-URLs-displayed-in-OverDr.patch (text/plain), 5.18 KB, created by
Katrin Fischer
on 2014-04-07 20:00:39 UTC
(
hide
)
Description:
[PASSED QA] Bug 11978 - Fix URLs displayed in OverDrive search
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-04-07 20:00:39 UTC
Size:
5.18 KB
patch
obsolete
>From 7fe73f0c5d8174cc093f5dd27ab2d8051cbd4a7b Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <pianohacker@gmail.com> >Date: Thu, 20 Mar 2014 11:20:40 -0600 >Subject: [PATCH] [PASSED QA] Bug 11978 - Fix URLs displayed in OverDrive > search > >OverDrive has recently changed its APIs to include "http://" in the URLs >it returns. This patch removes the "http://" on the Koha end so they >aren't doubled. > >Test plan: > 1. Run an OverDrive search on the OPAC. > 2. Check the links, they should start with "http://http://" > 3. Apply this patch. > 4. Rerun the search, the links should now be correct. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >I can reproduce the problem and confirm that this patch fixes it. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Patch removes hardcoded http:// from URLs in the Overdrive code. >Trusting Jesse and Owen to have tested this with Overdrive, >code review reveals no additional changes or possible problems. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt | 6 +++--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-overdrive-search.tt | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt >index 9aeff2d..1d3924f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt >@@ -79,7 +79,7 @@ function fetch_availability( prod, $tr ) { > $availability_summary.find( '.available' ).append( ', ' + _("waiting holds:") + ' <strong>' + data.numberOfHolds + '</strong>' ); > } > >- $tr.find( '.info' ).append( '<div class="actions-menu"><span class="actions"><a href="http://' + prod.contentDetails[0].href + '" ' + ( data.copiesAvailable ? ( ' class="addtocart">' + _("Check out") ) : ( ' class="hold">' + _("Place hold") ) ) + '</a></span></div>' ); >+ $tr.find( '.info' ).append( '<div class="actions-menu"><span class="actions"><a href="' + prod.contentDetails[0].href + '" ' + ( data.copiesAvailable ? ( ' class="addtocart">' + _("Check out") ) : ( ' class="hold">' + _("Place hold") ) ) + '</a></span></div>' ); > } > ); > } >@@ -108,7 +108,7 @@ function search( offset ) { > > results.push( '<tr>' ); > >- results.push( '<td class="info"><a class="title" href="http://', prod.contentDetails[0].href, '">' ); >+ results.push( '<td class="info"><a class="title" href="', prod.contentDetails[0].href, '">' ); > results.push( prod.title ); > if ( prod.subtitle ) results.push( ', ', prod.subtitle ); > results.push( '</a>' ); >@@ -127,7 +127,7 @@ function search( offset ) { > > results.push( '<td>' ); > if ( prod.images.thumbnail ) { >- results.push( '<a href="http://', prod.contentDetails[0].href, '">' ); >+ results.push( '<a href="', prod.contentDetails[0].href, '">' ); > results.push( '<img class="thumbnail" src="', prod.images.thumbnail.href, '" />' ); > results.push( '</a>' ); > } >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-overdrive-search.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-overdrive-search.tt >index 2114c2a..f80e46a 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-overdrive-search.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-overdrive-search.tt >@@ -25,7 +25,7 @@ function fetch_availability( prod, $tr ) { > $availability_summary.find( '.available' ).append( ', ' + _("waiting holds:") + ' <strong>' + data.numberOfHolds + '</strong>' ); > } > >- $tr.find( '.info' ).append( '<span class="results_summary actions"><span class="label">' + _("Actions:") + ' </span><a href="http://' + prod.contentDetails[0].href + '" ' + ( data.copiesAvailable ? ( ' class="addtocart">' + _("Check out") ) : ( ' class="hold">' + _("Place hold") ) ) + '</a></span>' ); >+ $tr.find( '.info' ).append( '<span class="results_summary actions"><span class="label">' + _("Actions:") + ' </span><a href="' + prod.contentDetails[0].href + '" ' + ( data.copiesAvailable ? ( ' class="addtocart">' + _("Check out") ) : ( ' class="hold">' + _("Place hold") ) ) + '</a></span>' ); > } > ); > } >@@ -54,7 +54,7 @@ function search( offset ) { > > results.push( '<tr>' ); > >- results.push( '<td class="info"><a class="title" href="http://', prod.contentDetails[0].href, '">' ); >+ results.push( '<td class="info"><a class="title" href="', prod.contentDetails[0].href, '">' ); > results.push( prod.title ); > if ( prod.subtitle ) results.push( ', ', prod.subtitle ); > results.push( '</a>' ); >@@ -71,7 +71,7 @@ function search( offset ) { > > results.push( '<td>' ); > if ( prod.images.thumbnail ) { >- results.push( '<a href="http://', prod.contentDetails[0].href, '">' ); >+ results.push( '<a href="', prod.contentDetails[0].href, '">' ); > results.push( '<img class="thumbnail" src="', prod.images.thumbnail.href, '" />' ); > results.push( '</a>' ); > } >-- >1.8.3.2
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 11978
:
26497
|
26856
| 26885