Mailing List Archive

svn commit: rev 6657 - incubator/spamassassin/trunk/lib/Mail/SpamAssassin
Author: quinlan
Date: Sun Feb 15 04:41:53 2004
New Revision: 6657

Modified:
incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
Log:
remove HTML order tests


Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm (original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm Sun Feb 15 04:41:53 2004
@@ -3389,55 +3389,6 @@
}
}

-sub html_order {
- my ($self, undef, $type, $one, $two) = @_;
-
- return 0 unless defined @{ $self->{html}{order} };
-
- my $last = 'undef';
-
- # type test on outside of loop should be faster
- if ($type eq "any") {
- for my $tag (@{ $self->{html}{order} }) {
- return 1 if $last eq $one && $tag eq $two;
- $last = $tag;
- }
- }
- elsif ($type eq "ignore") {
- for (@{ $self->{html}{order} }) {
- my $tag = $_;
- $tag =~ s@^/@@;
- return 1 if $last eq $one && $tag eq $two;
- $last = $tag;
- }
- }
- elsif ($type eq "open") {
- for my $tag (@{ $self->{html}{order} }) {
- next if substr($tag, 0, 1) eq "/";
- return 1 if $last eq $one && $tag eq $two;
- $last = $tag;
- }
- }
- elsif ($type eq "close") {
- for my $tag (@{ $self->{html}{order} }) {
- next if substr($tag, 0, 1) ne "/";
- return 1 if $last eq $one && $tag eq $two;
- $last = $tag;
- }
- }
- elsif ($type eq "range") {
- my %seen;
- my $count = 0;
- for my $tag (@{ $self->{html}{order} }) {
- $count++ unless $seen{"$last $tag"}++;
- $last = $tag;
- }
- return (($one eq 'undef' || $count >= $one) &&
- ($two eq 'undef' || $count < $two));
- }
- return 0;
-}
-
###########################################################################

sub check_hashcash_value {