offline_circ must use SQLite v2 - because Kyles PHP does
authorMichael Hafen <mdhafen@tech.washk12.org>
Tue, 5 May 2009 22:56:30 +0000 (16:56 -0600)
committerGalen Charlton <galen.charlton@liblime.com>
Thu, 21 May 2009 20:26:21 +0000 (15:26 -0500)
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 <galen.charlton@liblime.com>

Makefile.PL
about.pl
misc/cronjobs/create_koc_db.pl

index f399684..3150394 100644 (file)
@@ -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,
index c106db2..56d1717 100755 (executable)
--- 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
index 0aed4d0..8e9a6b8 100755 (executable)
@@ -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;
     }