Changeset 3907

Show
Ignore:
Timestamp:
06/26/08 12:33:06 (2 months ago)
Author:
osimons
Message:

FullBlogPlugin: Fix for spamfilter users.

There was code that was obviously wrong in the spamfilter plugin. Now it looks better, but I don't have that plugin so it is somewhat (totally) untested...

I'll close ticket #3229 with this change - please reopen if problem persists.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fullblogplugin/0.11/tracfullblog/spamfilter.py

    r3112 r3907  
    3939 
    4040        field_names = set(fields).union(last_post_fields) 
    41         changes = [(to_unicode(last_post_fields.get(k, '')), 
    42                     to_unicode(fields.get(k, '')))] 
     41        changes = [] 
     42        for field in field_names: 
     43            old = to_unicode(last_post_fields.get(field, '')) 
     44            new = to_unicode(fields.get(field, '')) 
     45            if new and old != new: 
     46                changes.append((old, new)) 
    4347        author = fields.get('author', '') 
    4448        FilterSystem(self.env).test(req, author, changes)