[followup](bug #4334) fix duplicate entries in sql
[koha.git] / catalogue / export.pl
index a6b7cb0..0093ce0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
-use HTML::Template;
+use HTML::Template::Pro;
 use strict;
-require Exporter;
+
 use C4::Record;
 use C4::Auth;
 use C4::Output;
@@ -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/) {