Committer: aurbanowich
LJSUP-7424 Content Scanning of Posts for Negative TermsU trunk/cgi-bin/LJ/Entry.pm
Modified: trunk/cgi-bin/LJ/Entry.pm =================================================================== --- trunk/cgi-bin/LJ/Entry.pm 2011-01-27 07:57:48 UTC (rev 18122) +++ trunk/cgi-bin/LJ/Entry.pm 2011-01-27 08:17:36 UTC (rev 18123) @@ -1355,6 +1355,16 @@ return $compressed; } +sub check_for_negative_terms { + my $self = shift; + + my $tags = $self->prop('personifi_tags'); + return $1 if $tags =~ /nterms:(\w+)/; + my $nterms = ( $self->event_raw =~ /($LJ::NEGATIVE_TERMS)/)?'no':'yes'; + $self->set_prop(personifi_tags => ($tags?"$tags,":'') . "nterms:$nterms"); + return $nterms; +} + package LJ; use Class::Autouse qw (