Lines 137-147
Link Here
|
137 |
return 0; |
137 |
return 0; |
138 |
} |
138 |
} |
139 |
|
139 |
|
140 |
unless ($self->_initialize_db(0)) { |
140 |
unless (my $init = $self->_initialize_db(0)) { |
141 |
dbg("bayes: unable to initialize database for ".$self->{_username}." user, aborting!"); |
141 |
dbg("bayes: unable to initialize database for ".$self->{_username}." user, aborting!"); |
142 |
$self->untie_db(); |
142 |
$self->untie_db(); |
143 |
return 0; |
143 |
return 0; |
144 |
} |
144 |
} |
|
|
145 |
elsif ($init == -1) { |
146 |
dbg("bayes: $self->{_username} has no data in database, aborting!"); |
147 |
return 0; |
148 |
} |
145 |
|
149 |
|
146 |
return 1; |
150 |
return 1; |
147 |
} |
151 |
} |
Lines 1770-1776
Link Here
|
1770 |
} |
1774 |
} |
1771 |
|
1775 |
|
1772 |
# Do not create an entry for this user unless we were specifically asked to |
1776 |
# Do not create an entry for this user unless we were specifically asked to |
1773 |
return 0 unless ($create_entry_p); |
1777 |
return -1 unless ($create_entry_p); |
1774 |
|
1778 |
|
1775 |
# For now let the database setup the other variables as defaults |
1779 |
# For now let the database setup the other variables as defaults |
1776 |
my $sqlinsert = "INSERT INTO bayes_vars (username) VALUES (?)"; |
1780 |
my $sqlinsert = "INSERT INTO bayes_vars (username) VALUES (?)"; |