Bugzilla – Attachment 60739 Details for
Bug 18172
Logged in user page shows internal server error if OverDriveCirculation is disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18172 - Disabled Overdrive shows error on logged in user page
Bug-18172---Disabled-Overdrive-shows-error-on-logg.patch (text/plain), 2.76 KB, created by
Liz Rea
on 2017-02-28 20:21:26 UTC
(
hide
)
Description:
Bug 18172 - Disabled Overdrive shows error on logged in user page
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2017-02-28 20:21:26 UTC
Size:
2.76 KB
patch
obsolete
>From 5dbf9c1c7754a75163c668c1004fc066255bf67a Mon Sep 17 00:00:00 2001 >From: Liz Rea <liz@catalyst.net.nz> >Date: Mon, 27 Feb 2017 00:42:41 +0000 >Subject: [PATCH] Bug 18172 - Disabled Overdrive shows error on logged in user > page > >To test: >Have overdrive disabled (default state) >log into the OPAC (I did it with plack) note the error just below the >tabs on the page. >Note that the overdrive JS is being fetched/included >Apply this patch >Restart plack/memcached >refresh the page, note that the error is gone. >Also note that the JS for Overdrive is no longer being fetched/included. >--- > C4/Auth_with_ldap.pm | 5 +++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 5 ++++- > 2 files changed, 9 insertions(+), 1 deletion(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 3a7c3e3..3489b3d 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -350,6 +350,11 @@ sub update_local { > my $borrowerid = shift or croak "No borrowerid"; > my $borrower = shift or croak "No borrower record"; > >+ for my $field ( qw( dateofbirth dateenrolled dateexpiry debarred sms_provider_id guarantorid ) ) { >+ delete $borrower->{$field} unless $borrower->{$field}; >+ } >+ >+ > my @keys = keys %$borrower; > my $dbh = C4::Context->dbh; > my $query = "UPDATE borrowers\nSET " . >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index c862a14..dc1c430 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -139,9 +139,10 @@ Using this account is not recommended because some parts of Koha will not functi > <li><a href="#opac-user-overdrive">OverDrive Account</a></li> > [% END %] > </ul> >- >+ [% IF ( OverDriveCirculation ) %] > <div id="opac-user-overdrive"> > </div> >+ [% END %] > <div id="opac-user-checkouts"> > [% IF ( issues_count ) %] > <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post"> >@@ -896,6 +897,7 @@ Using this account is not recommended because some parts of Koha will not functi > }); > //]]> > </script> >+ [% IF ( OverDriveCirculation ) %] > <script type="text/javascript" src="[% interface %]//[% theme %]/js/overdrive.js"></script> > <script type="text/JavaScript"> > $(document).ready(function() { >@@ -910,4 +912,5 @@ Using this account is not recommended because some parts of Koha will not functi > } ); > }); > </script> >+ [% END %] > [% END %] >-- >2.1.4
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 18172
:
60739
|
60740