[Koha-patches] [PATCH] Fixes bug 3326: escapes ampersands in itemcallnumber element of XML
Ian Walls
ian.walls at bywatersolutions.com
Tue May 4 23:44:59 CEST 2010
Galen,
>From my testing, no warning is visible in the OPAC for items where
itemcallnumber is undefined. The value of $itemcallnumber prints as a null
string, and thus fails gracefully. Will check the staff client tomorrow.
Am I missing a logged warning somewhere?
This test was performed on the latest code, synced today.
-Ian
On Tue, May 4, 2010 at 4:45 PM, Galen Charlton <gmcharlt at gmail.com> wrote:
> Hi,
>
> Why take out the test on whether $item->{itemcallnumber} was defined?
> Doing so will cause a warning if the call number is null.
>
> Regards,
>
> Galen
>
> On Tue, May 4, 2010 at 4:36 PM, Ian Walls
> <ian.walls at bywatersolutions.com> wrote:
> > From: Brendan A. Gallagher <brendan at bywatersolutions.com>
> >
> > Signed-off-by: Ian Walls <ian.walls at bywatersolutions.com>
> > ---
> > C4/XSLT.pm | 5 +++--
> > 1 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/C4/XSLT.pm b/C4/XSLT.pm
> > index f1fc9db..ccf6fc2 100644
> > --- a/C4/XSLT.pm
> > +++ b/C4/XSLT.pm
> > @@ -206,10 +206,11 @@ sub buildKohaItemsNamespace {
> > $status = "available";
> > }
> > my $homebranch =
> $branches->{$item->{homebranch}}->{'branchname'};
> > + my $itemcallnumber = $item->{itemcallnumber};
> > + $itemcallnumber =~ s/\&/\&\;/g;
> > $xml.= "<item><homebranch>$homebranch</homebranch>".
> > "<status>$status</status>".
> > - (defined $item->{'itemcallnumber'} ?
> "<itemcallnumber>".$item->{'itemcallnumber'}."</itemcallnumber>"
> > - : "<itemcallnumber />")
> > + "<itemcallnumber>".$itemcallnumber."</itemcallnumber>"
> > . "</item>";
> >
> > }
> > --
> > 1.5.6.5
> >
> > _______________________________________________
> > Koha-patches mailing list
> > Koha-patches at lists.koha.org
> > http://lists.koha.org/mailman/listinfo/koha-patches
> >
>
>
>
> --
> Galen Charlton
> gmcharlt at gmail.com
>
--
Ian Walls
Lead Development Specialist
ByWater Solutions
ALA Booth # 817
Phone # (888) 900-8944
http://bywatersolutions.com
ian.walls at bywatersolutions.com
Twitter: @sekjal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20100504/18948fb0/attachment-0001.htm>
More information about the Koha-patches
mailing list