From 6c0dbfb86db5babab8f184db5093b902fd248c18 Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Tue, 5 May 2009 16:56:30 -0600 Subject: [PATCH] offline_circ must use SQLite v2 - because Kyles PHP does The Offline Circ tool by Kyle Hall uses PHP's SQLite, which is SQLite v2. Gnope, which Kyle links, ships with libSQLite v2. Let's not count on libsqlite3 not being installed for perl. If it is installed DBD::SQLite will use it, where DBD::SQLite2 will not. Signed-off-by: Galen Charlton --- Makefile.PL | 2 +- about.pl | 2 +- misc/cronjobs/create_koc_db.pl | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index f3996844c3..315039436f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -541,7 +541,7 @@ WriteMakefile( 'Class::Factory::Util' => 1.6, 'Class::Accessor' => 0.30, 'DBD::mysql' => 4.004, - 'DBD::SQLite' => 1.13, # optional, used for offline circulation + 'DBD::SQLite2' => 0.33, # optional, used for offline circulation 'DBI' => 1.53, 'Data::Dumper' => 2.121, 'Data::ICal' => 0.13, diff --git a/about.pl b/about.pl index c106db2e9b..56d1717dd7 100755 --- a/about.pl +++ b/about.pl @@ -72,7 +72,7 @@ Class::Factory::Util Class::Accessor Compress::Zlib DBD::mysql -DBD::SQLite +DBD::SQLite2 DBI Data::Dumper Data::ICal diff --git a/misc/cronjobs/create_koc_db.pl b/misc/cronjobs/create_koc_db.pl index 0aed4d0377..8e9a6b8bfe 100755 --- a/misc/cronjobs/create_koc_db.pl +++ b/misc/cronjobs/create_koc_db.pl @@ -111,7 +111,7 @@ verify_dbd_sqlite(); ## Create DB Connections my $dbh_mysql = C4::Context->dbh; -my $dbh_sqlite = DBI->connect( "dbi:SQLite:dbname=$filename", "", "" ); +my $dbh_sqlite = DBI->connect( "dbi:SQLite2:dbname=$filename", "", "" ); $dbh_sqlite->{AutoCommit} = 0; create_borrowers_table(); @@ -131,12 +131,12 @@ make sure we have a new enough version of it. sub verify_dbd_sqlite { - eval { require DBD::SQLite; }; + eval { require DBD::SQLite2; }; if ( $EVAL_ERROR ) { my $msg = <<'END_MESSAGE'; -DBD::SQLite is required to generate offline circultion database files, but not found. -Please install the DBD::SQLite perl module. It is availalbe from -http://search.cpan.org/dist/DBD-SQLite/ or through the CPAN module. +DBD::SQLite2 is required to generate offline circultion database files, but not found. +Please install the DBD::SQLite2 perl module. It is availalbe from +http://search.cpan.org/dist/DBD-SQLite2/ or through the CPAN module. END_MESSAGE die $msg; } -- 2.20.1