Bugzilla – Attachment 114091 Details for
Bug 26797
Error when trying to access Relative Checkouts between Professional and Organizational patron categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26797: Escape firstname to prevent relative's checkouts to crash
Bug-26797-Escape-firstname-to-prevent-relatives-ch.patch (text/plain), 1.81 KB, created by
Jonathan Druart
on 2020-12-02 10:28:28 UTC
(
hide
)
Description:
Bug 26797: Escape firstname to prevent relative's checkouts to crash
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-12-02 10:28:28 UTC
Size:
1.81 KB
patch
obsolete
>From 0165396cd4d838d3785872bcbbbbf992149b0c56 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 2 Dec 2020 11:25:13 +0100 >Subject: [PATCH] Bug 26797: Escape firstname to prevent relative's checkouts > to crash > >If no firstname is defined for a relative, the "Relative's checkouts" >tab will be "processing" forever. >JS error: > TypeError: oObj.borrower.firstname is null > >Test plan: >Patron A is Org and guarantor of patron B >Check an item out to B >Go to the details page of A, click "Relative's checkouts" >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index f3cb49611b..3dc0b8dcfd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -817,10 +817,10 @@ $(document).ready(function() { > { > "mDataProp": function( oObj ) { > return "<a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=" + oObj.borrowernumber + "'>" >- + oObj.borrower.firstname.escapeHtml() >+ + ( oObj.borrower.firstname ? oObj.borrower.firstname.escapeHtml() : "" ) > + " " + >- oObj.borrower.surname.escapeHtml() >- + " (" + oObj.borrower.cardnumber.escapeHtml() + ")</a>" >+ ( oObj.borrower.surname ? oObj.borrower.surname.escapeHtml() : "" ) >+ + " (" + ( oObj.borrower.cardnumber ? oObj.borrower.cardnumber.escapeHtml() : "" ) + ")</a>" > } > }, > ], >-- >2.20.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 26797
:
114091
|
114099
|
114977