From 032992042dc0dcc910465e1ded4b7bbb6d23e9f6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 5 Apr 2017 18:55:13 -0300 Subject: [PATCH] Bug 18403: output_and_exit_if_error for circulation.pl This is a follow-up for a previous patch, changes have been tested already Signed-off-by: Signed-off-by: Jon McGowan Signed-off-by: Jonathan Druart --- circ/circulation.pl | 5 +++++ koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 2 +- .../prog/en/modules/circ/circulation_batch_checkouts.tt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index d074c8fb92..ceccef18b6 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -128,6 +128,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( flagsrequired => { circulate => 'circulate_remaining_permissions' }, } ); +my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; my $force_allow_issue = $query->param('forceallow') || 0; if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) { @@ -262,6 +263,10 @@ if ($findborrower) { # get the borrower information..... $patron ||= Koha::Patrons->find( $borrowernumber ) if $borrowernumber; if ($patron) { + + $template->param( borrowernumber => $patron->borrowernumber ); + output_and_exit_if_error( $query, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); + my $overdues = $patron->get_overdues; my $issues = $patron->checkouts; my $balance = $patron->account->balance; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 8bad09d409..cdfb908bd2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -152,7 +152,7 @@ $(document).ready(function() {
[% END %] -[% IF borrowernumber and borrower %] +[% IF borrowernumber %] [% INCLUDE 'members-toolbar.inc' %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt index 62edad40dd..9bbdabb272 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt @@ -34,7 +34,7 @@
-[% IF borrowernumber and borrower %] +[% IF borrowernumber %] [% INCLUDE 'members-toolbar.inc' %] [% END %] -- 2.39.5