Bugzilla – Attachment 99778 Details for
Bug 24754
UserEnv not set for ISLDI requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23165: Set branch for renewal
Bug-23165-Set-branch-for-renewal.patch (text/plain), 1.65 KB, created by
Nick Clemens (kidclamp)
on 2020-02-28 15:56:46 UTC
(
hide
)
Description:
Bug 23165: Set branch for renewal
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-02-28 15:56:46 UTC
Size:
1.65 KB
patch
obsolete
>From f8a2c7c09a995323a1fa4993a99ecfefb7223ada Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 28 Feb 2020 15:52:06 +0000 >Subject: [PATCH] Bug 23165: Set branch for renewal > >Originally I used 'opac' as the interface so that we would follow >opac rules for setting the branches for renewals. > >If using api we must explicitly state the branch - falling back to >the checkout branch is the simplest fix as we don't have a user here. > >This also corrects typo if setting surname/firstname to CRON instead of ILSDI > >https://bugs.koha-community.org/show_bug.cgi?id=24754 >--- > C4/ILSDI/Services.pm | 2 +- > opac/ilsdi.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 1ed424e18a..1d9d10f7e5 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -644,7 +644,7 @@ sub RenewLoan { > > # Add renewal if possible > my @renewal = CanBookBeRenewed( $borrowernumber, $itemnumber ); >- if ( $renewal[0] ) { AddRenewal( $borrowernumber, $itemnumber ); } >+ if ( $renewal[0] ) { AddRenewal( $borrowernumber, $itemnumber, $item->checkout->branchcode ); } > > my $issue = $item->checkout; > return unless $issue; # FIXME should be handled >diff --git a/opac/ilsdi.pl b/opac/ilsdi.pl >index e138cc0a9a..b4061ba396 100755 >--- a/opac/ilsdi.pl >+++ b/opac/ilsdi.pl >@@ -130,7 +130,7 @@ unless ( $cgi->param('service') ) { > # Set the userenv > C4::Context->_new_userenv(1); > C4::Context->set_userenv( >- undef, undef, undef, 'CRON', 'CRON', undef, >+ undef, undef, undef, 'ILSDI', 'ILSDI', undef, > undef, undef, undef, undef, undef > ); > C4::Context->interface('api'); >-- >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 24754
:
99768
|
99772
|
99773
|
99778
|
100000
|
100001
|
100006
|
100035
|
100269
|
100305
|
101094
|
101584
|
101585