Bugzilla – Attachment 81594 Details for
Bug 21702
mancredit.pl incorrectly passes user_id instead of the patron id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21702: (follow-up) Simplify checks and use standard fallback behaviour
Bug-21702-follow-up-Simplify-checks-and-use-standa.patch (text/plain), 2.00 KB, created by
Josef Moravec
on 2018-10-29 22:00:16 UTC
(
hide
)
Description:
Bug 21702: (follow-up) Simplify checks and use standard fallback behaviour
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-10-29 22:00:16 UTC
Size:
2.00 KB
patch
obsolete
>From 219caa407181c67ad8c3ad74aa507ac90c59c8f1 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Sat, 27 Oct 2018 09:22:00 -0300 >Subject: [PATCH] Bug 21702: (follow-up) Simplify checks and use standard > fallback behaviour > >This patch acknowledges the fact that some checks here are done in a way >that is not standard these days. This checks are originally done >multiple times in different ways. output_and_exit_if_error should be >used. > >This implies a minor behaviour change: if the passed (in the URL) >borrowernumber doesn't exist, it sends the user to a 'Patron doesn't >exist page' instead of the circulation page for the borrowernumber. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > members/mancredit.pl | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > >diff --git a/members/mancredit.pl b/members/mancredit.pl >index 49ab8a4..5000fb2 100755 >--- a/members/mancredit.pl >+++ b/members/mancredit.pl >@@ -55,10 +55,9 @@ my $logged_in_user = Koha::Patrons->find($loggedinuser) or die "Not logged in"; > my $borrowernumber = $input->param('borrowernumber'); > my $patron = Koha::Patrons->find($borrowernumber); > >-unless ( $patron ) { >- print $input->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber"); >- exit; >-} >+output_and_exit_if_error( $input, $cookie, $template, >+ { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); >+ > my $add = $input->param('add'); > > if ($add){ >@@ -94,7 +93,6 @@ if ($add){ > print $input->redirect("/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber"); > > } else { >- output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); > > if (C4::Context->preference('ExtendedPatronAttributes')) { > my $attributes = GetBorrowerAttributes($borrowernumber); >-- >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 21702
:
81360
|
81361
|
81464
|
81465
|
81593
| 81594