Bug 5760 : MT3137 : Adding jquery.tablesorter and jquery.tablesorter.pager support...
[koha_gimpoz] / C4 / XSLT.pm
index d454981..f1c5293 100644 (file)
@@ -128,10 +128,10 @@ sub XSLTParse4Display {
     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\>/;
@@ -210,16 +210,15 @@ sub buildKohaItemsNamespace {
         } else {
             $status = "available";
         }
-        my $homebranch = $branches->{$item->{homebranch}}->{'branchname'};
-        my $itemcallnumber = $item->{itemcallnumber} || '';
-        $itemcallnumber =~ s/\&/\&amp\;/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;
 }