HTML::Template => HTML::Template::Pro
[koha.git] / catalogue / export.pl
index a6b7cb0..758afd3 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-use HTML::Template;
+use HTML::Template::Pro;
 use strict;
 require Exporter;
 use C4::Record;
@@ -23,7 +23,11 @@ if ($op eq "export") {
        while (my ($marc) = $sth->fetchrow) {
                if ($marc){
 
-                       if ($format =~ /marcxml/) {
+                       if ($format =~ /endnote/) {
+                               $marc = marc2endnote($marc);
+                               $format = 'endnote';
+                       }
+                       elsif ($format =~ /marcxml/) {
                                $marc = marc2marcxml($marc);
                        }
                        elsif ($format=~ /mods/) {