Bug 5727 Warning in log due to XSLT.pm
XSLT.pm add few syspref to MARCXML record send to be transformed by XSLT. If one of those syspref doesn't exist, it generated a warning. Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
050466ce2b
commit
bfec5ef4c1
|
|
@ -129,9 +129,9 @@ sub XSLTParse4Display {
|
|||
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
|
||||
my $sysxml = "<sysprefs>\n";
|
||||
foreach my $syspref ( qw/OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD OPACBaseURL/ ) {
|
||||
$sysxml .= "<syspref name=\"$syspref\">" .
|
||||
C4::Context->preference( $syspref ) .
|
||||
"</syspref>\n";
|
||||
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\>/;
|
||||
|
|
|
|||
Loading…
Reference in New Issue