Bug 7977: Fixing a bug which results in quote fields being incorrectly offset when saving uploaded quotes

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
This commit is contained in:
Chris Nighswonger 2012-05-11 10:35:25 -04:00 committed by Paul Poulain
parent 5c6129687b
commit f328a32402
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ my $sth = $dbh->prepare('INSERT INTO quotes (source, text) VALUES (?, ?);');
my $insert_count = 0;
foreach my $quote (@$quotes) {
$insert_count++ if $sth->execute($quote->[0], $quote->[1]);
$insert_count++ if $sth->execute($quote->[1], $quote->[2]);
if ($sth->err) {
warn sprintf('Database returned the following error: %s', $sth->errstr);
$success = 'false';