Added a URI filter to encode a cardnumber for borrowers as to not break patronimage.pl
authorElliott Davis <elliott@bywatersolutions.com>
Wed, 11 Jul 2012 10:52:53 +0000 (05:52 -0500)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 2 Aug 2012 12:17:10 +0000 (14:17 +0200)
To Test:

Add a + (or any char that would need to be encoded) to a card number of a patron with an image attached.
Go to member/moremember.pl.
If the patrons image is there, you are golden.

http://bugs.koha-community.org/show_bug.cgi?id=8421
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc

index 9f1c887..f2cd877 100644 (file)
@@ -7,7 +7,7 @@
 <ul>
 [% IF ( patronimages ) %]
 [% IF ( picture ) %]
-<li><img src="/cgi-bin/koha/members/patronimage.pl?crdnum=[% cardnumber %]" id="patronimage" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="max-width : 140px; margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC; width:auto !important; width:130px;" /></li>
+<li><img src="/cgi-bin/koha/members/patronimage.pl?crdnum=[% cardnumber | uri %]" id="patronimage" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="max-width : 140px; margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC; width:auto !important; width:130px;" /></li>
 [% ELSE %]
 <li><img src="/intranet-tmpl/prog/img/patron-blank.png" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
 [% END %]