[Koha-patches] [PATCH] offline_circ must use SQLite v2 - because Kyles PHP does

Michael Hafen mdhafen at tech.washk12.org
Wed May 6 00:56:30 CEST 2009


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.
---
 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 1445690..db2be81 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -540,7 +540,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 c106db2..56d1717 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 0aed4d0..8e9a6b8 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;
     }
-- 
1.5.6.3




More information about the Koha-patches mailing list