Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11563/Classifier
Modified Files:
Tag: b0_22_2
Bayes.pm
Log Message:
Fix bug that prevented magnets containing quote characters from being deleted.
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.327.4.7
retrieving revision 1.327.4.8
diff -C2 -d -r1.327.4.7 -r1.327.4.8
*** Bayes.pm 22 Jan 2007 12:29:32 -0000 1.327.4.7
--- Bayes.pm 31 Aug 2007 14:13:48 -0000 1.327.4.8
***************
*** 3843,3851 ****
my $mtid = $result->[0];
$self->{db__}->do( "delete from magnets
where magnets.bucketid = $bucketid and
magnets.mtid = $mtid and
! magnets.val = '$text';" );
}
--- 3843,3852 ----
my $mtid = $result->[0];
+ $text = $self->{db__}->quote( $text );
$self->{db__}->do( "delete from magnets
where magnets.bucketid = $bucketid and
magnets.mtid = $mtid and
! magnets.val = $text;" );
}
|