[Koha-patches] [PATCH] Bugfix: Fixing hardcoded dir paths in C4::XSLT

Chris Nighswonger cnighswonger at foundations.edu
Thu Jan 28 18:26:30 CET 2010


---
 C4/XSLT.pm |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/C4/XSLT.pm b/C4/XSLT.pm
index 8a67e04..10bcd51 100644
--- a/C4/XSLT.pm
+++ b/C4/XSLT.pm
@@ -73,7 +73,7 @@ sub transformMARCXML4XSLT {
                     $value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib )
                         if $av->{ $tag }->{ $letter };
                     push( @new_subfields, $letter, $value );
-                } 
+                }
                 $field ->replace_with( MARC::Field->new(
                     $tag,
                     $field->indicator(1),
@@ -118,6 +118,7 @@ sub getAuthorisedValues4MARCSubfields {
 my $stylesheet;
 
 sub XSLTParse4Display {
+    use Data::Dumper; #XXX
     my ( $biblionumber, $orig_record, $xsl_suffix, $interface ) = @_;
     $interface = 'opac' unless $interface;
     # grab the XML, run it through our stylesheet, push it out to the browser
@@ -143,12 +144,12 @@ sub XSLTParse4Display {
         my $xslt = XML::LibXSLT->new();
         my $xslfile;
         if ($interface eq 'intranet') {
-            $xslfile = C4::Context->config('intrahtdocs') . 
+            $xslfile = C4::Context->config('intrahtdocs') .
                       "/prog/en/xslt/" .
                       C4::Context->preference('marcflavour') .
                       "slim2intranet$xsl_suffix.xsl";
         } else {
-            $xslfile = C4::Context->config('opachtdocs') . 
+            $xslfile = C4::Context->config('opachtdocs') .
                       "/prog/en/xslt/" .
                       C4::Context->preference('marcflavour') .
                       "slim2OPAC$xsl_suffix.xsl";
@@ -176,7 +177,7 @@ sub buildKohaItemsNamespace {
              (defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} ) {
             if ( $item->{notforloan} < 0) {
                 $status = "On order";
-            } 
+            }
             if ( $item->{itemnotforloan} > 0 || $item->{notforloan} > 0 || $itemtypes->{ $item->{itype} }->{notforloan} == 1 ) {
                 $status = "reference";
             }
@@ -190,7 +191,7 @@ sub buildKohaItemsNamespace {
                 $status = "Lost";
             }
             if ($item->{damaged}) {
-                $status = "Damaged"; 
+                $status = "Damaged";
             }
             if (defined $transfertwhen && $transfertwhen ne '') {
                 $status = 'In transit';
@@ -201,7 +202,7 @@ sub buildKohaItemsNamespace {
         my $homebranch = $branches->{$item->{homebranch}}->{'branchname'};
         $xml.= "<item><homebranch>$homebranch</homebranch>".
 		"<status>$status</status>".
-		(defined $item->{'itemcallnumber'} ? "<itemcallnumber>".$item->{'itemcallnumber'}."</itemcallnumber>" 
+		(defined $item->{'itemcallnumber'} ? "<itemcallnumber>".$item->{'itemcallnumber'}."</itemcallnumber>"
                                            : "<itemcallnumber />")
         . "</item>";
 
-- 
1.6.0.4




More information about the Koha-patches mailing list