From 5dbf9c1c7754a75163c668c1004fc066255bf67a Mon Sep 17 00:00:00 2001 From: Liz Rea 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
  • OverDrive Account
  • [% END %] - + [% IF ( OverDriveCirculation ) %]
    + [% END %]
    [% IF ( issues_count ) %]
    @@ -896,6 +897,7 @@ Using this account is not recommended because some parts of Koha will not functi }); //]]> + [% IF ( OverDriveCirculation ) %] + [% END %] [% END %] -- 2.1.4