my $itemsxml = buildKohaItemsNamespace($biblionumber);
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
my $sysxml = "<sysprefs>\n";
- foreach my $syspref ( qw/OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD/ ) {
- $sysxml .= "<syspref name=\"$syspref\">" .
- C4::Context->preference( $syspref ) .
- "</syspref>\n";
+ foreach my $syspref ( qw/OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD OPACBaseURL/ ) {
+ my $sp = C4::Context->preference( $syspref );
+ next unless defined($sp);
+ $sysxml .= "<syspref name=\"$syspref\">$sp</syspref>\n";
}
$sysxml .= "</sysprefs>\n";
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/;
} else {
$status = "available";
}
- my $homebranch = $branches->{$item->{homebranch}}->{'branchname'};
- my $itemcallnumber = $item->{itemcallnumber} || '';
- $itemcallnumber =~ s/\&/\&\;/g;
+ my $homebranch = xml_escape($branches->{$item->{homebranch}}->{'branchname'});
+ my $itemcallnumber = xml_escape($item->{itemcallnumber});
$xml.= "<item><homebranch>$homebranch</homebranch>".
"<status>$status</status>".
"<itemcallnumber>".$itemcallnumber."</itemcallnumber>"
. "</item>";
}
- $xml = "<items xmlns=\"http://www.koha.org/items\">".$xml."</items>";
+ $xml = "<items xmlns=\"http://www.koha-community.org/items\">".$xml."</items>";
return $xml;
}