From: luke Date: Sat, 6 Sep 2008 16:10:44 +0000 (-0400) Subject: Fixes X-Git-Tag: 2.1-alpha-2019-0-29~162 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=781ae990aab2e9994f85376bf34fb3806f92919b;p=insipid.git Fixes --- diff --git a/insipid.cgi b/insipid.cgi index 16b1b2e..9ea2a42 100755 --- a/insipid.cgi +++ b/insipid.cgi @@ -43,13 +43,16 @@ if($@) { "search CPAN " . "for the module or check the " . "" . - "Insipid homepage for more information."); + "Insipid homepage for more information.", + $errstr); } elsif ( ($errstr =~ /Couldn\'t acquire lock on id/) || ($errstr =~ /doesn\'t exist/) || ($errstr =~ /relation \".*\" does not exist/) ) { + # This means that a database connection was established but the # tables were not found. + undef($@); eval { require Insipid::Database; Insipid::Database::install(); diff --git a/lib/Insipid/Database.pm b/lib/Insipid/Database.pm index eb8e680..d6c5d90 100755 --- a/lib/Insipid/Database.pm +++ b/lib/Insipid/Database.pm @@ -57,7 +57,7 @@ my %options; my $sql = "select name, value from $tbl_options"; my $sth = $dbh->prepare($sql); -$sth->execute() or die $DBI::errstr; +$sth->execute() or return 1; #die $DBI::errstr; while(my $hr = $sth->fetchrow_hashref) { $options{$hr->{'name'}} = $hr->{'value'};