Bugzilla – Attachment 129337 Details for
Bug 29544
A patron can set everybody's checkout notes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29544: Fix opac-issue-note.pl
Bug-29544-Fix-opac-issue-notepl.patch (text/plain), 1.65 KB, created by
Tomás Cohen Arazi
on 2022-01-12 12:47:13 UTC
(
hide
)
Description:
Bug 29544: Fix opac-issue-note.pl
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2022-01-12 12:47:13 UTC
Size:
1.65 KB
patch
obsolete
>From f2df04c9d96b78283184262b5aaf126960e50aef Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 2 Dec 2021 09:04:14 +0100 >Subject: [PATCH] Bug 29544: Fix opac-issue-note.pl > >We must check if logged in user is trying to modify one of their >checkouts > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > opac/opac-issue-note.pl | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-issue-note.pl b/opac/opac-issue-note.pl >index d109ccc79a..5cfb7aef15 100755 >--- a/opac/opac-issue-note.pl >+++ b/opac/opac-issue-note.pl >@@ -49,6 +49,14 @@ $template->param( > > my $issue_id = $query->param('issue_id'); > my $issue = Koha::Checkouts->find( $issue_id ); >+ >+ >+if ( !$issue || $issue->borrowernumber != $borrowernumber ) { >+ # exit early >+ print $query->redirect("/cgi-bin/koha/opac-user.pl"); >+ exit; >+} >+ > my $itemnumber = $issue->itemnumber; > my $biblio = $issue->item->biblio; > $template->param( >@@ -60,10 +68,11 @@ $template->param( > ); > > my $action = $query->param('action') || ""; >-if ( $action eq 'issuenote' && C4::Context->preference('AllowCheckoutNotes') ) { >+if ( $action eq 'issuenote' && C4::Context->preference('AllowCheckoutNotes') && $issue ) { > my $note = $query->param('note'); > my $scrubber = C4::Scrubber->new(); > my $clean_note = $scrubber->scrub($note); >+ > if ( $issue->set({ notedate => dt_from_string(), note => $clean_note, noteseen => 0 })->store ) { > if ($clean_note) { # only send email if note not empty > my $branch = Koha::Libraries->find( $issue->branchcode ); >-- >2.32.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 29544
:
127930
|
128148
|
128946
|
128947
|
129336
| 129337 |
129338