Bugzilla – Attachment 81361 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), 1.89 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-10-27 12:25:56 UTC
(
hide
)
Description:
Bug 21702: (follow-up) Simplify checks and use standard fallback behaviour
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-10-27 12:25:56 UTC
Size:
1.89 KB
patch
obsolete
>From 49d96adfdd634c605f167cb4d752d9bf9c5c5d88 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> >--- > members/mancredit.pl | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > >diff --git a/members/mancredit.pl b/members/mancredit.pl >index 49ab8a4213..5000fb2f85 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.19.1
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