[Koha-patches] [PATCH] New patch to remove the need to edit parserdetails.ini
Chris Cormack
chrisc at catalyst.net.nz
Mon May 24 02:00:29 CEST 2010
---
C4/Biblio.pm | 2 +
C4/Record.pm | 4 +++
cataloguing/addbiblio.pl | 5 +++-
cataloguing/additem.pl | 2 +
cataloguing/moveitem.pl | 3 +-
installer/data/mysql/update22to30.pl | 21 +++++++++++++++++--
installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++-
misc/batchImportMARCWithBiblionumbers.pl | 2 +
misc/batchupdateISBNs.pl | 3 +-
misc/maintenance/MARC21_utf8_flag_fix.pl | 2 +-
.../migration_tools/22_to_30/export_Authorities.pl | 4 +++
.../22_to_30/export_Authorities_xml.pl | 3 ++
.../22_to_30/move_marc_to_biblioitems.pl | 3 ++
misc/migration_tools/bulkauthimport.pl | 3 +-
misc/migration_tools/bulkmarcimport.pl | 3 ++
misc/sax_parser_print.pl | 1 +
misc/sax_parser_test.pl | 2 +-
xml_sax.pl | 2 +
18 files changed, 72 insertions(+), 10 deletions(-)
create mode 100644 xml_sax.pl
diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 91e9027..5e5103f 100644
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -1,6 +1,7 @@
package C4::Biblio;
# Copyright 2000-2002 Katipo Communications
+# Parts copyright Catalyst 2010
#
# This file is part of Koha.
#
@@ -34,6 +35,7 @@ use C4::ClassSource;
use C4::Charset;
require C4::Heading;
require C4::Serials;
+require "xml_sax.pl"; # set the correct xml parser
use vars qw($VERSION @ISA @EXPORT);
diff --git a/C4/Record.pm b/C4/Record.pm
index 233fa6e..27c14ea 100644
--- a/C4/Record.pm
+++ b/C4/Record.pm
@@ -3,6 +3,8 @@ package C4::Record;
# Copyright 2006 (C) LibLime
# Joshua Ferraro <jmf at liblime.com>
#
+# Parts copyright Catalyst 2010
+#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
@@ -36,6 +38,8 @@ use C4::Koha; #marc2csv
use YAML; #marcrecords2csv
use Text::CSV::Encoded; #marc2csv
+require "xml_sax.pl"; # set the correct xml parser
+
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl
index fc56047..345f4cc 100755
--- a/cataloguing/addbiblio.pl
+++ b/cataloguing/addbiblio.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
-
# Copyright 2000-2002 Katipo Communications
+# Parts copyright Catalyst 2010
#
# This file is part of Koha.
#
@@ -20,6 +20,9 @@
use strict;
#use warnings; FIXME - Bug 2505
+
+require "xml_sax.pl"; # set the correct xml parser
+
use CGI;
use C4::Output;
use C4::Auth;
diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
index bd3876e..e83c9ae 100755
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -2,6 +2,7 @@
# Copyright 2000-2002 Katipo Communications
+# Parts Copyright Catalyst 2010
#
# This file is part of Koha.
#
@@ -31,6 +32,7 @@ use C4::Branch; # XXX subfield_is_koha_internal_p
use C4::ClassSource;
use C4::Dates;
+require "xml_sax.pl"; # set the correct xml parser
use MARC::File::XML;
sub find_value {
diff --git a/cataloguing/moveitem.pl b/cataloguing/moveitem.pl
index e0ab551..a887e7d 100755
--- a/cataloguing/moveitem.pl
+++ b/cataloguing/moveitem.pl
@@ -3,6 +3,7 @@
# Move an item from a biblio to another
#
# Copyright 2009 BibLibre
+# Parts copyright Catalyst 2010
#
# This file is part of Koha.
#
@@ -33,7 +34,7 @@ use C4::ClassSource;
use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder ModOrderItem/;
use Date::Calc qw(Today);
-
+require "xml_sax.pl"; # set the correct xml parser
use MARC::File::XML;
my $query = CGI->new;
diff --git a/installer/data/mysql/update22to30.pl b/installer/data/mysql/update22to30.pl
index c12c5bb..1d46a04 100755
--- a/installer/data/mysql/update22to30.pl
+++ b/installer/data/mysql/update22to30.pl
@@ -4,8 +4,23 @@
# Database Updater
# This script checks for required updates to the database.
-# Part of the Koha Library Software www.koha.org
-# Licensed under the GPL.
+# Copyright 2008 Biblibre
+# Parts Copyright 2010 Catalyst
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Bugs/ToDo:
# - Would also be a good idea to offer to do a backup at this time...
@@ -19,7 +34,7 @@ use DBI;
use Getopt::Long;
# Koha modules
use C4::Context;
-
+require "xml_sax.pl"; # set the correct xml parser
use MARC::Record;
use MARC::File::XML ( BinaryEncoding => 'utf8' );
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 53fec36..80b5025 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -7,6 +7,21 @@
# Part of the Koha Library Software www.koha.org
# Licensed under the GPL.
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
# Bugs/ToDo:
# - Would also be a good idea to offer to do a backup at this time...
@@ -23,7 +38,7 @@ use Getopt::Long;
# Koha modules
use C4::Context;
use C4::Installer;
-
+require "xml_sax.pl"; # set the correct xml parser
use MARC::Record;
use MARC::File::XML ( BinaryEncoding => 'utf8' );
diff --git a/misc/batchImportMARCWithBiblionumbers.pl b/misc/batchImportMARCWithBiblionumbers.pl
index 4acc02b..a9841bf 100755
--- a/misc/batchImportMARCWithBiblionumbers.pl
+++ b/misc/batchImportMARCWithBiblionumbers.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl
# load records that already have biblionumber set into a koha system
+# Copyright Tumer Garip 2006
# Written by TG on 10/04/2006
use strict;
#use warnings; FIXME - Bug 2505
@@ -14,6 +15,7 @@ BEGIN {
use C4::Context;
use C4::Biblio;
+require "xml_sax.pl"; # set the correct xml parser
use MARC::Record;
use MARC::File::USMARC;
use MARC::File::XML;
diff --git a/misc/batchupdateISBNs.pl b/misc/batchupdateISBNs.pl
index 8cc8c6a..f7a4c2a 100755
--- a/misc/batchupdateISBNs.pl
+++ b/misc/batchupdateISBNs.pl
@@ -15,7 +15,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-
+# FIXME Copyright?
=head1 batchupdateISBNs.pl
@@ -32,6 +32,7 @@ BEGIN {
eval { require "$FindBin::Bin/kohalib.pl" };
}
use C4::Context;
+require "xml_sax.pl"; # set the correct xml parser
use MARC::File::XML;
use MARC::Record;
use Getopt::Long;
diff --git a/misc/maintenance/MARC21_utf8_flag_fix.pl b/misc/maintenance/MARC21_utf8_flag_fix.pl
index e7e9156..7a537ff 100755
--- a/misc/maintenance/MARC21_utf8_flag_fix.pl
+++ b/misc/maintenance/MARC21_utf8_flag_fix.pl
@@ -19,7 +19,7 @@
use strict;
use warnings;
-
+require "xml_sax.pl"; # set the correct xml parser
use MARC::Record;
use MARC::File::XML;
use Getopt::Long qw(:config auto_help auto_version);
diff --git a/misc/migration_tools/22_to_30/export_Authorities.pl b/misc/migration_tools/22_to_30/export_Authorities.pl
index aeed3f2..c7eff97 100755
--- a/misc/migration_tools/22_to_30/export_Authorities.pl
+++ b/misc/migration_tools/22_to_30/export_Authorities.pl
@@ -1,6 +1,9 @@
#!/usr/bin/perl
#use strict;
#use warnings; FIXME - Bug 2505
+
+# FIXME Copyright and License statement
+
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
@@ -10,6 +13,7 @@ BEGIN {
use C4::Context;
#use MARC::File::XML(BinaryEncoding=>"utf8");
#use MARC::File::USMARC;
+require "xml_sax.pl"; # set the correct xml parser
use MARC::Record;
use C4::AuthoritiesMarc;
use POSIX;
diff --git a/misc/migration_tools/22_to_30/export_Authorities_xml.pl b/misc/migration_tools/22_to_30/export_Authorities_xml.pl
index 70647ee..8022333 100755
--- a/misc/migration_tools/22_to_30/export_Authorities_xml.pl
+++ b/misc/migration_tools/22_to_30/export_Authorities_xml.pl
@@ -1,6 +1,8 @@
#!/usr/bin/perl
#use strict;
#use warnings; FIXME - Bug 2505
+# FIXME license and copyright statements
+
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
@@ -8,6 +10,7 @@ BEGIN {
eval { require "$FindBin::Bin/../../kohalib.pl" };
}
use C4::Context;
+require "xml_sax.pl"; # set the correct xml parser
use MARC::File::XML(BinaryEncoding=>"utf8");
use MARC::Record;
use C4::AuthoritiesMarc;
diff --git a/misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl b/misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl
index 3635dbc..a2789e2 100755
--- a/misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl
+++ b/misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl
@@ -3,6 +3,8 @@
#use warnings; FIXME - Bug 2505
# script to shift marc to biblioitems
# scraped from updatedatabase for dev week by chris at katipo.co.nz
+# Parts Copyright 2005 chris at katipo.co.nz
+# FIXME other copyrights and license
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
@@ -11,6 +13,7 @@ BEGIN {
}
use C4::Context;
use C4::Biblio;
+require "xml_sax.pl"; # set the correct xml parser
use MARC::Record;
use MARC::File::XML ( BinaryEncoding => 'utf8' );
diff --git a/misc/migration_tools/bulkauthimport.pl b/misc/migration_tools/bulkauthimport.pl
index 2709db9..cdc7626 100755
--- a/misc/migration_tools/bulkauthimport.pl
+++ b/misc/migration_tools/bulkauthimport.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# small script that import an iso2709 file into koha 2.0
-
+# FIXME License and copyright statements
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
@@ -11,6 +11,7 @@ BEGIN {
}
# Koha modules used
+require "xml_sax.pl"; # set the correct xml parser
use Unicode::Normalize;
use MARC::File::USMARC;
use MARC::File::XML;
diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl
index da0ebf7..6f7fe7f 100755
--- a/misc/migration_tools/bulkmarcimport.pl
+++ b/misc/migration_tools/bulkmarcimport.pl
@@ -1,6 +1,8 @@
#!/usr/bin/perl
# Import an iso2709 file into Koha 3
+#FIXME License and copyright statements
+
use strict;
use warnings;
#use diagnostics;
@@ -12,6 +14,7 @@ BEGIN {
}
# Koha modules used
+require "xml_sax.pl"; # set the correct xml parser
use MARC::File::USMARC;
use MARC::File::XML;
use MARC::Record;
diff --git a/misc/sax_parser_print.pl b/misc/sax_parser_print.pl
index d206a5e..5399bdb 100755
--- a/misc/sax_parser_print.pl
+++ b/misc/sax_parser_print.pl
@@ -2,6 +2,7 @@
# check the current SAX Parser
use strict;
+require "xml_sax.pl";
use warnings;
use XML::SAX::ParserFactory;
diff --git a/misc/sax_parser_test.pl b/misc/sax_parser_test.pl
index b2e5974..f6f0cf1 100755
--- a/misc/sax_parser_test.pl
+++ b/misc/sax_parser_test.pl
@@ -2,7 +2,7 @@
use strict;
use warnings;
-
+require "xml_sax.pl"; # set the correct xml parser
use XML::SAX;
use Encode;
diff --git a/xml_sax.pl b/xml_sax.pl
new file mode 100644
index 0000000..a58d189
--- /dev/null
+++ b/xml_sax.pl
@@ -0,0 +1,2 @@
+BEGIN { $XML::SAX::ParserPackage = "XML::LibXML::SAX::Parser"; }
+1;
\ No newline at end of file
--
1.6.3.3
More information about the Koha-patches
mailing list