Moved C4/Charset.pm to C4/Interface/CGI/Output.pm
[koha-ffzg.git] / acqui.simple / marcimport.pl
index 80b5d15..34930ef 100755 (executable)
@@ -36,14 +36,13 @@ use DBI;
 # Koha modules used
 use C4::Context;
 use C4::Output;
-use C4::Charset;
+use C4::Interface::CGI::Output;
 use C4::Input;
 use C4::Biblio;
 use MARC::File::USMARC;
 use HTML::Template;
 use C4::Output;
 use C4::Auth;
-use MARC::Charset;
 
 #------------------
 # Constants
@@ -131,9 +130,9 @@ if ($uploadmarc && length($uploadmarc)>0) {
                                        my $recoded;
                                        $recoded = $marcrecord->as_usmarc();
                                                if ($breedingid) {
-                                                       $replacesql ->execute($filename,$oldbiblio->{isbn}.$oldbiblio->{issn},$oldbiblio->{title},$oldbiblio->{author},$recoded,$breedingid);
+                                                       $replacesql ->execute($filename,substr($oldbiblio->{isbn}.$oldbiblio->{issn},0,10),$oldbiblio->{title},$oldbiblio->{author},$recoded,$breedingid);
                                                } else {
-                                                       $insertsql ->execute($filename,$oldbiblio->{isbn}.$oldbiblio->{issn},$oldbiblio->{title},$oldbiblio->{author},$recoded);
+                                                       $insertsql ->execute($filename,substr($oldbiblio->{isbn}.$oldbiblio->{issn},0,10),$oldbiblio->{title},$oldbiblio->{author},$recoded);
                                                }
                                        $imported++;
                                } else {
@@ -151,10 +150,7 @@ if ($uploadmarc && length($uploadmarc)>0) {
 
 }
 
-print $input->header(
-    -type => guesstype($template->output),
-    -cookie => $cookie
-),$template->output;
+output_html_with_http_headers $input, $cookie, $template->output;
 my $menu;
 my $file;
 
@@ -810,6 +806,27 @@ sub FormatMarcText {
 #---------------
 # log cleared, as marcimport is (almost) rewritten from scratch.
 # $Log$
+# Revision 1.30  2003/02/02 07:18:38  acli
+# Moved C4/Charset.pm to C4/Interface/CGI/Output.pm
+#
+# Create output_html_with_http_headers function to contain the "print $query
+# ->header(-type => guesstype...),..." call. This is in preparation for
+# non-HTML output (e.g., text/xml) and charset conversion before output in
+# the future.
+#
+# Created C4/Interface/CGI/Template.pm to hold convenience functions specific
+# to the CGI interface using HTML::Template
+#
+# Modified moremembers.pl to make the "sex" field localizable for languages
+# where M and F doesn't make sense
+#
+# Revision 1.29  2003/01/28 15:28:31  tipaul
+# removing use MARC::Charset
+# Was a buggy test
+#
+# Revision 1.28  2003/01/28 15:00:31  tipaul
+# user can now search in breeding farm with isbn/issn or title. Title/name are stored in breeding farm and showed when a search is done
+#
 # Revision 1.27  2003/01/26 23:21:49  acli
 # Handle non-latin1 charsets
 #