Bugzilla – Attachment 65057 Details for
Bug 18938
opac/svc/patron_notes and opac/opac-issue-note.pl use GetMember
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18938: (bug 17829 follow-up) Replace 2 occurrences of GetMember left behind
Bug-18938-bug-17829-follow-up-Replace-2-occurrence.patch (text/plain), 3.68 KB, created by
Jonathan Druart
on 2017-07-14 15:20:46 UTC
(
hide
)
Description:
Bug 18938: (bug 17829 follow-up) Replace 2 occurrences of GetMember left behind
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-07-14 15:20:46 UTC
Size:
3.68 KB
patch
obsolete
>From b7295cc00a534c0b3b0e9871aa6d37349e2e7e79 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 14 Jul 2017 12:19:13 -0300 >Subject: [PATCH] Bug 18938: (bug 17829 follow-up) Replace 2 occurrences of > GetMember left behind > >Between patch submission and push, 2 new occurrences appeared in the >codebase. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > opac/opac-issue-note.pl | 12 ++++++------ > opac/svc/patron_notes | 10 +++++----- > 2 files changed, 11 insertions(+), 11 deletions(-) > >diff --git a/opac/opac-issue-note.pl b/opac/opac-issue-note.pl >index 832e365a4e..376a32c9a1 100755 >--- a/opac/opac-issue-note.pl >+++ b/opac/opac-issue-note.pl >@@ -23,13 +23,13 @@ use CGI qw ( -utf8 ); > use C4::Koha; > use C4::Context; > use C4::Scrubber; >-use C4::Members; > use C4::Output; > use C4::Auth; > use C4::Biblio; > use C4::Letters; > use Koha::Checkouts; > use Koha::DateUtils; >+use Koha::Patrons; > > my $query = new CGI; > >@@ -43,10 +43,10 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-my $member = C4::Members::GetMember( borrowernumber => $borrowernumber ); >+my $patron = Koha::Patrons->find( $borrowernumber ); > $template->param( >- firstname => $member->{'firstname'}, >- surname => $member->{'surname'}, >+ firstname => $patron->firstname, >+ surname => $patron->surname, > borrowernumber => $borrowernumber, > ); > >@@ -76,10 +76,10 @@ if ( $action eq 'issuenote' && C4::Context->preference('AllowCheckoutNotes') ) { > branchcode => $branch, > tables => { > 'biblio' => $biblio->biblionumber, >- 'borrowers' => $member->{borrowernumber}, >+ 'borrowers' => $borrowernumber, > }, > ); >- C4::Message->enqueue($letter, $member, 'email'); >+ C4::Message->enqueue($letter, $patron->unblessed, 'email'); > } > } > print $query->redirect("/cgi-bin/koha/opac-user.pl"); >diff --git a/opac/svc/patron_notes b/opac/svc/patron_notes >index d68bb699d7..6110cf1bd6 100755 >--- a/opac/svc/patron_notes >+++ b/opac/svc/patron_notes >@@ -27,10 +27,10 @@ use CGI; > use C4::Output qw(:DEFAULT :ajax); > use C4::Scrubber; > use C4::Circulation; >-use C4::Members; > use C4::Biblio; > use Koha::Checkouts; > use Koha::DateUtils; >+use Koha::Patrons; > > =head1 NAME > >@@ -57,7 +57,7 @@ if ($is_ajax) { > my $issue_id = $query->param('issue_id'); > my $clean_note = $scrubber->scrub($note); > my $status = "saved"; >- my ($member, $issue); >+ my ($patron, $issue); > > my ( $template, $borrowernumber, $cookie ) = C4::Auth::get_template_and_user({ > template_name => "opac-user.tt", >@@ -68,7 +68,7 @@ if ($is_ajax) { > > # verify issue_id > if ( $issue_id =~ /\d+/ ) { >- $member = GetMember(borrowernumber => $borrowernumber); >+ $patron = Koha::Patrons->find( $borrowernumber ); > $issue = Koha::Checkouts->find($issue_id); > if ( $issue->borrowernumber != $borrowernumber ) { > $status = "fail"; >@@ -86,10 +86,10 @@ if ($is_ajax) { > branchcode => $branch, > tables => { > 'biblio' => $biblionumber, >- 'borrowers' => $member->{borrowernumber}, >+ 'borrowers' => $borrowernumber, > }, > ); >- C4::Message->enqueue($letter, $member, 'email'); >+ C4::Message->enqueue($letter, $patron->unblessed, 'email'); > } else { # note empty, i.e removed > $status = "removed"; > } >-- >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 18938
: 65057