From 81e5ddd39c9a35dd84cffe0804baa7c5cdd8bb41 Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 18 Mar 2003 11:58:49 +0000 Subject: [PATCH] bugfix 214 : can enter stopwords separated by space or , --- admin/stopwords.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/admin/stopwords.pl b/admin/stopwords.pl index ee5f1ff4f2..f5cbcf8d2d 100755 --- a/admin/stopwords.pl +++ b/admin/stopwords.pl @@ -167,10 +167,11 @@ printend # called by add_form, used to insert/modify data in DB } elsif ($op eq 'add_validate') { my $dbh = C4::Context->dbh; - my $query = "replace stopwords (word) values ("; - $query.= $dbh->quote($input->param('word')).")"; - my $sth=$dbh->prepare($query); - $sth->execute; + my @tab = split / |,/, $input->param('word'); + my $sth=$dbh->prepare("replace stopwords (word) values (?)"); + foreach my $insert_value (@tab) { + $sth->execute($insert_value); + } $sth->finish; print "data recorded"; print "
"; -- 2.39.5