[Koha-patches] [PATCH] Bug 7345: Follow up: Adding the new export option to staff interface

Katrin Fischer Katrin.Fischer.83 at web.de
Sun Jan 1 20:37:06 CET 2012


This patch adds the new export option 'marcstd' for exporting MARC
records without 9xx, x9x and xx9 fields and subfields to the staff
detail page.

Patch applies on top of first patch for this bug.
---
 catalogue/export.pl                                |    3 ++-
 .../intranet-tmpl/prog/en/includes/cat-toolbar.inc |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/catalogue/export.pl b/catalogue/export.pl
index db69af9..d832fbb 100755
--- a/catalogue/export.pl
+++ b/catalogue/export.pl
@@ -27,6 +27,7 @@ if ($op eq "export") {
 		if ($biblionumber){
 
 			my $marc = GetMarcBiblio($biblionumber, 1);
+            my $error = '';
 
 			if ($format =~ /endnote/) {
 				$marc = marc2endnote($marc);
@@ -53,7 +54,7 @@ if ($op eq "export") {
 			}
             elsif ($format =~ /marcstd/) {
                 C4::Charset::SetUTF8Flag($marc,1);
-                ($error,$marc) = marc2marc($marc, 'marcstd', C4::Context->preference('marcflavour'));
+                ($error, $marc) = marc2marc($marc, 'marcstd', C4::Context->preference('marcflavour'));
             }
 			print $query->header(
 				-type => 'application/octet-stream',
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
index 413d7f4..114f345 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
@@ -122,7 +122,8 @@ function confirm_items_deletion() {
 			{ text: _("Dublin Core (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=dc&op=export&bib=[% biblionumber %]" },
 			{ text: _("MARCXML"), url: "/cgi-bin/koha/catalogue/export.pl?format=marcxml&op=export&bib=[% biblionumber %]" },
 			{ text: _("MARC (non-Unicode/MARC-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=marc8&op=export&bib=[% biblionumber %]" },
-			{ text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=[% biblionumber %]" }
+            { text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=[% biblionumber %]" },
+            { text: _("MARC (Unicode/UTF-8, Standard)"), url: "/cgi-bin/koha/catalogue/export.pl?format=marcstd&op=export&bib=[% biblionumber %]" }
 		];
 
 	    new YAHOO.widget.Button({
-- 
1.7.5.4



More information about the Koha-patches mailing list