No subject
Wed Apr 28 00:58:20 CEST 2010
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
--0016e6d77e3207e54f0485cb9f66
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Galen,<div><br></div><div><br>From my testing, no warning is visible in the=
OPAC for items where itemcallnumber is undefined. =C2=A0The value of $item=
callnumber prints as a null string, and thus fails gracefully. =C2=A0Will c=
heck the staff client tomorrow. =C2=A0Am I missing a logged warning somewhe=
re?</div>
<div><br></div><div>This test was performed on the latest code, synced toda=
y.</div><div><br></div><div><br></div><div>-Ian</div><div><br><div class=3D=
"gmail_quote">On Tue, May 4, 2010 at 4:45 PM, Galen Charlton <span dir=3D"l=
tr"><<a href=3D"mailto:gmcharlt at gmail.com">gmcharlt at gmail.com</a>></s=
pan> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">Hi,<br>
<br>
Why take out the test on whether $item->{itemcallnumber} was defined?<br=
>
Doing so will cause a warning if the call number is null.<br>
<br>
Regards,<br>
<br>
Galen<br>
<div><div></div><div class=3D"h5"><br>
On Tue, May 4, 2010 at 4:36 PM, Ian Walls<br>
<<a href=3D"mailto:ian.walls at bywatersolutions.com">ian.walls at bywatersolu=
tions.com</a>> wrote:<br>
> From: Brendan A. Gallagher <<a href=3D"mailto:brendan at bywatersoluti=
ons.com">brendan at bywatersolutions.com</a>><br>
><br>
> Signed-off-by: Ian Walls <<a href=3D"mailto:ian.walls at bywatersoluti=
ons.com">ian.walls at bywatersolutions.com</a>><br>
> ---<br>
> =C2=A0C4/XSLT.pm | =C2=A0 =C2=A05 +++--<br>
> =C2=A01 files changed, 3 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/C4/XSLT.pm b/C4/XSLT.pm<br>
> index f1fc9db..ccf6fc2 100644<br>
> --- a/C4/XSLT.pm<br>
> +++ b/C4/XSLT.pm<br>
> @@ -206,10 +206,11 @@ sub buildKohaItemsNamespace {<br>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $status =3D "available&=
quot;;<br>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 my $homebranch =3D $branches->{$item-&g=
t;{homebranch}}->{'branchname'};<br>
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0my $itemcallnumber =3D $item->{itemcal=
lnumber};<br>
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0$itemcallnumber =3D~ s/\&/\&amp\;=
/g;<br>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 $xml.=3D "<item><homebranch&=
gt;$homebranch</homebranch>".<br>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"<statu=
s>$status</status>".<br>
> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (defined $item->=
{'itemcallnumber'} ? "<itemcallnumber>".$item->{=
'itemcallnumber'}."</itemcallnumber>"<br>
> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 : "<itemcallnumber />")<br>
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "<itemcalln=
umber>".$itemcallnumber."</itemcallnumber>"<br>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 . "</item>";<br>
><br>
> =C2=A0 =C2=A0 }<br>
> --<br>
> 1.5.6.5<br>
><br>
</div></div>> _______________________________________________<br>
> Koha-patches mailing list<br>
> <a href=3D"mailto:Koha-patches at lists.koha.org">Koha-patches at lists.koha=
.org</a><br>
> <a href=3D"http://lists.koha.org/mailman/listinfo/koha-patches" target=
=3D"_blank">http://lists.koha.org/mailman/listinfo/koha-patches</a><br>
><br>
<font color=3D"#888888"><br>
<br>
<br>
--<br>
Galen Charlton<br>
<a href=3D"mailto:gmcharlt at gmail.com">gmcharlt at gmail.com</a><br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>Ian Walls<br>Lea=
d Development Specialist<br>ByWater Solutions<br>ALA Booth # 817<br>Phone #=
(888) 900-8944<br><a href=3D"http://bywatersolutions.com">http://bywaterso=
lutions.com</a><br>
<a href=3D"mailto:ian.walls at bywatersolutions.com">ian.walls at bywatersolution=
s.com</a><br>Twitter: @sekjal<br>
</div>
--0016e6d77e3207e54f0485cb9f66--
More information about the Koha-patches
mailing list