]> 91.132.146.200 Git - insipid.git/commitdiff
Fixes
authorluke <luke@neuro-tech.net>
Sat, 6 Sep 2008 16:10:44 +0000 (12:10 -0400)
committerluke <luke@neuro-tech.net>
Sat, 6 Sep 2008 16:10:44 +0000 (12:10 -0400)
insipid.cgi
lib/Insipid/Database.pm

index 16b1b2eb781dcd0d9f5ec1a12273ce9ea4564260..9ea2a428a28c2edf6feed503a468bc126e87802b 100755 (executable)
@@ -43,13 +43,16 @@ if($@) {
                        "<a href=\"http://search.cpan.org/\">search CPAN</a> " .
                        "for the module or check the " .
                        "<a href=\"http://www.neuro-tech.net/insipid/\">" .
-                       "Insipid</a> homepage for more information.");
+                       "Insipid</a> 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();
index eb8e6809f7e4141114dbf700d61fae95a29023f0..d6c5d90e42d5b1a2883f289b78f7a146f1c6f014 100755 (executable)
@@ -57,7 +57,7 @@ my %options;
 \r
 my $sql = "select name, value from $tbl_options";\r
 my $sth = $dbh->prepare($sql);\r
-$sth->execute() or die $DBI::errstr;\r
+$sth->execute() or return 1; #die $DBI::errstr;\r
 \r
 while(my $hr = $sth->fetchrow_hashref) {\r
        $options{$hr->{'name'}} = $hr->{'value'};\r