[Koha-cvs] CVS: koha/admin stopwords.pl,1.6,1.7
Paul POULAIN
tipaul at users.sourceforge.net
Tue Mar 18 12:58:51 CET 2003
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv20566/admin
Modified Files:
stopwords.pl
Log Message:
bugfix 214 : can enter stopwords separated by space or ,
Index: stopwords.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/stopwords.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** stopwords.pl 5 Oct 2002 10:03:21 -0000 1.6
--- stopwords.pl 18 Mar 2003 11:58:49 -0000 1.7
***************
*** 168,175 ****
} 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;
$sth->finish;
print "data recorded";
--- 168,176 ----
} elsif ($op eq 'add_validate') {
my $dbh = C4::Context->dbh;
! 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";
More information about the Koha-cvs
mailing list