From: miker Date: Mon, 4 May 2009 23:42:00 +0000 (+0000) Subject: quiet warnings about undef string escaping; add more fields to the top level copy... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=404e3fc57bc76434e1ab20922cac520750b6e749;p=Evergreen.git quiet warnings about undef string escaping; add more fields to the top level copy element git-svn-id: svn://svn.open-ils.org/ILS/trunk@13065 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm index a28dfe27ae..7f0bbcf1ed 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm @@ -1060,6 +1060,7 @@ Returns the XML representation of the requested bibliographic record's holdings sub escape { my $self = shift; my $text = shift; + return '' unless $text; $text =~ s/&/&/gsom; $text =~ s//>/gsom; @@ -1785,10 +1786,15 @@ sub as_xml { my $self = shift; my $args = shift; - my $xml = 'obj->id . '" '; - $xml .= 'barcode="' . $self->escape( $self->obj->barcode ) . '">'; + $xml .= $_ . '="' . $self->escape( $self->obj->$_ ) . '" ' for (qw/ + create_date edit_date copy_number circulate deposit ref holdable deleted + deposit_amount price barcode circ_modifier circ_as_type opac_visible + /); + + $xml .= '>'; $xml .= '' . $self->escape( $self->obj->status->name ) . ''; $xml .= '' . $self->escape( $self->obj->location->name ) . '';